From 60d41fd5149da7c8c974ea1323996faa27803a20 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 20 Oct 2009 22:03:33 -0600 Subject: [PATCH] Better contextmenu separator display --- imp/js/DimpBase.js | 20 ++++++++----- imp/templates/index/index-dimp.inc | 57 ++++++++++++++++++++++++++------------ imp/themes/screen-dimp.css | 9 +++--- 3 files changed, 57 insertions(+), 29 deletions(-) diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index ffba8bfc4..ffdf0c18b 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -858,8 +858,7 @@ var DimpBase = { [ $('ctx_folder_nopoll') ].invoke(tmp ? 'hide' : 'show'); tmp = $(this.getSubFolderId(baseelt.readAttribute('id'))); - $('ctx_folder_collapse', 'ctx_folder_expand').invoke(tmp ? 'show' : 'hide'); - [ $('ctx_folder_expand').previous() ].invoke(tmp ? 'addClassName' : 'removeClassName', 'sep'); + [ $('ctx_folder_expand').up() ].invoke(tmp ? 'show' : 'hide'); break; case 'ctx_reply': @@ -871,11 +870,18 @@ var DimpBase = { break; case 'ctx_otheractions': - tmp = $('oa_blacklist', 'oa_whitelist', 'oa_undeleted'); - if (this.viewport.getMetaData('readonly')) { - $('oa_setflag', 'oa_unsetflag').invoke('hide'); - } else { - tmp = tmp.concat($('oa_setflag', 'oa_unsetflag')); + tmp = [ $('oa_undeleted') ]; + $('oa_blacklist', 'oa_whitelist').each(function(o) { + if (o) { + tmp.push(o.up()); + } + }); + if ($('oa_setflag')) { + if (this.viewport.getMetaData('readonly')) { + $('oa_setflag').up().hide(); + } else { + tmp.push($('oa_setflag').up()); + } } tmp.compact().invoke(this.viewport.getSelected().size() ? 'show' : 'hide'); break; diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index 66fdb8afe..f8400f48f 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -321,22 +321,28 @@ function _simpleButton($id, $text, $image) - + +
- + +
- - +
+
+ + +
@@ -349,7 +355,8 @@ function _simpleButton($id, $text, $image) - + +
@@ -365,10 +372,12 @@ function _simpleButton($id, $text, $image)