From: Michael M Slusarz Date: Fri, 3 Dec 2010 19:26:53 +0000 (-0700) Subject: Move dimp help text out of preview space X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=96de30b66b2f1c9a9107d9189bf127d9dde433aa;p=horde.git Move dimp help text out of preview space --- 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)