From: Michael M Slusarz Date: Wed, 5 May 2010 16:02:50 +0000 (-0600) Subject: Bug #9006: Don't trigger contextmenu on reply/forward buttons X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=42f9e84c96d0b11ac4c7967c74704eebc2fbaf64;p=horde.git Bug #9006: Don't trigger contextmenu on reply/forward buttons --- diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 59f8e64f3..00a225122 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -2965,8 +2965,8 @@ var DimpBase = { this._setQsearchText(true); /* Add popdown menus. Check for disabled compose at the same time. */ - DimpCore.addPopdown('button_other', 'otheractions'); - DimpCore.addPopdown('folderopts_link', 'folderopts'); + DimpCore.addPopdown('button_other', 'otheractions', true); + DimpCore.addPopdown('folderopts_link', 'folderopts', true); DM.addSubMenu('ctx_message_reply', 'ctx_reply'); DM.addSubMenu('ctx_message_forward', 'ctx_forward'); @@ -2981,8 +2981,8 @@ var DimpBase = { if (DIMP.conf.disable_compose) { $('button_reply', 'button_forward').compact().invoke('up', 'SPAN').concat($('button_compose', 'composelink', 'ctx_contacts_new')).compact().invoke('remove'); } else { - DimpCore.addPopdown('button_reply', 'reply', true); - DimpCore.addPopdown('button_forward', 'forward', true); + DimpCore.addPopdown('button_reply', 'reply', false, true); + DimpCore.addPopdown('button_forward', 'forward', false, true); } DimpCore.addContextMenu({ diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index 2268c2cf3..ae4dcf4ab 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -331,21 +331,24 @@ var DimpCore = { // p = (Element) Parent element // t = (string) Context menu type + // trigger = (boolean) Trigger popdown on button click? // d = (boolean) Disabled? - addPopdown: function(p, t, d) + addPopdown: function(p, t, trigger, d) { var elt = new Element('SPAN', { className: 'iconImg popdownImg popdown' }); p = $(p); p.insert({ after: elt }); - this.addContextMenu({ - disable: d, - id: p.identify(), - left: true, - offset: p.up(), - type: t - }); + if (trigger) { + this.addContextMenu({ + disable: d, + id: p.identify(), + left: true, + offset: p.up(), + type: t + }); + } this.addContextMenu({ disable: d,