From 96de30b66b2f1c9a9107d9189bf127d9dde433aa Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 3 Dec 2010 12:26:53 -0700 Subject: [PATCH] Move dimp help text out of preview space --- imp/js/dimpbase.js | 41 +++++++++++++++++++++++++++- imp/templates/dimp/index.inc | 48 ++++++++++++++++++--------------- imp/templates/dimp/javascript_defs.php | 1 + imp/themes/default/dimp/screen.css | 23 ++++++++++++++++ imp/themes/default/graphics/help.png | Bin 0 -> 695 bytes imp/themes/silver/dimp/screen.css | 3 +++ imp/themes/silver/graphics/help.png | Bin 0 -> 731 bytes 7 files changed, 94 insertions(+), 22 deletions(-) create mode 100644 imp/themes/default/graphics/help.png create mode 100644 imp/themes/silver/graphics/help.png diff --git a/imp/js/dimpbase.js b/imp/js/dimpbase.js index c2aeac9eb..fe00bc799 100644 --- a/imp/js/dimpbase.js +++ b/imp/js/dimpbase.js @@ -902,6 +902,10 @@ var DimpBase = { this.purgeDeleted(); break; + case 'oa_help': + this.toggleHelp(); + break; + case 'ctx_vfolder_edit': tmp = { edit_query: e.findElement('LI').retrieve('mbox') }; // Fall through @@ -1398,10 +1402,28 @@ var DimpBase = { clearPreviewPane: function() { + var sel, txt; + this.loadingImg('msg', false); $('previewMsg').hide(); $('previewPane').scrollTop = 0; - $('previewInfo').show(); + + sel = this.selectedCount(); + switch (sel) { + case 0: + txt = DIMP.text.nomessages; + break; + + case 1: + txt = 1 + ' ' + DIMP.text.message; + break; + + default: + txt = sel + ' ' + DIMP.text.messages; + break; + } + $('previewInfo').update(txt + ' ' + DIMP.text.selected + '.').show(); + this.pp = null; }, @@ -2206,6 +2228,11 @@ var DimpBase = { e.stop(); return; + case 'helptext_close': + this.toggleHelp(); + e.stop(); + return; + default: if (elt.hasClassName('printAtc')) { DimpCore.popupWindow(DimpCore.addURLParam(DIMP.conf.URI_VIEW, { uid: this.pp.imapuid, mailbox: this.pp.view, actionID: 'print_attach', id: elt.readAttribute('mimeid') }, true), this.pp.imapuid + '|' + this.pp.view + '|print', IMP.printWindow); @@ -2261,6 +2288,18 @@ var DimpBase = { } }, + toggleHelp: function() + { + Effect.toggle($('helptext').down('DIV'), 'blind', { + duration: 0.75, + queue: { + position: 'end', + scope: 'DimpHelp', + limit: 2 + } + }); + }, + /* Handle rename folder actions. */ renameFolder: function(folder) { diff --git a/imp/templates/dimp/index.inc b/imp/templates/dimp/index.inc index bdd2ecb97..a15f069e5 100644 --- a/imp/templates/dimp/index.inc +++ b/imp/templates/dimp/index.inc @@ -172,27 +172,7 @@ function _simpleButton($id, $text, $image, $nodisplay = false)