From: Michael M Slusarz Date: Mon, 2 Feb 2009 07:00:55 +0000 (-0700) Subject: Fix addPopdown() behavior. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b4f3cb19b9e7a3b790f0840eccddaa83e0a883ea;p=horde.git Fix addPopdown() behavior. --- diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index 9c89af2d3..bad9c8eae 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -2221,11 +2221,11 @@ var DimpBase = { this._setFilterText(true); /* Add popdown menus. */ - DimpCore.addPopdown('button_reply', 'reply'); + this._addMouseEvents({ id: 'button_reply', type: 'reply' }, true); DimpCore.DMenu.disable('button_reply_img', true, true); - DimpCore.addPopdown('button_forward', 'forward'); + this._addMouseEvents({ id: 'button_forward', type: 'forward' }, true); DimpCore.DMenu.disable('button_forward_img', true, true); - DimpCore.addPopdown('button_other', 'otheractions'); + this._addMouseEvents({ id: 'button_other', type: 'otheractions' }, true); new Drop('dropbase', this._folderDropConfig); diff --git a/imp/js/src/DimpCore.js b/imp/js/src/DimpCore.js index 6dbab5ea4..11a484270 100644 --- a/imp/js/src/DimpCore.js +++ b/imp/js/src/DimpCore.js @@ -373,14 +373,6 @@ DimpCore = { } }, - /* Add a popdown menu to a dimpactions button. */ - addPopdown: function(bid, ctx) - { - var bidelt = $(bid); - bidelt.insert({ after: $($('popdown_img').cloneNode(false)).writeAttribute('id', bid + '_img').show() }); - this.DMenu.addElement(bid + '_img', 'ctx_' + ctx, { offset: bidelt.up(), left: true }); - }, - /* Add dropdown menus to addresses. */ buildAddressLinks: function(alist, elt) { diff --git a/imp/js/src/fullmessage-dimp.js b/imp/js/src/fullmessage-dimp.js index b9e4be81b..46440793b 100644 --- a/imp/js/src/fullmessage-dimp.js +++ b/imp/js/src/fullmessage-dimp.js @@ -119,23 +119,34 @@ var DimpFullmessage = { elt = elt.up(); } + }, + + /* Add a popdown menu to a dimpactions button. */ + addPopdown: function(bid, ctx) + { + var bidelt = $(bid); + bidelt.insert({ after: $($('popdown_img').cloneNode(false)).writeAttribute('id', bid + '_img').show() }); + DimpCore.DMenu.addElement(bid + '_img', 'ctx_' + ctx, { offset: bidelt.up(), left: true }); } }; document.observe('dom:loaded', function() { + var FM = DimpFullmessage; + window.focus(); - DimpCore.addPopdown('reply_link', 'replypopdown'); - DimpCore.addPopdown('forward_link', 'fwdpopdown'); + + FM.addPopdown('reply_link', 'replypopdown'); + FM.addPopdown('forward_link', 'fwdpopdown'); /* Set up address linking. */ [ 'from', 'to', 'cc', 'bcc', 'replyTo' ].each(function(a) { - if (DimpFullmessage[a]) { + if (FM[a]) { var elt = $('msgHeader' + a.charAt(0).toUpperCase() + a.substring(1)).down('TD', 1); - elt.replace(DimpCore.buildAddressLinks(DimpFullmessage[a], elt.cloneNode(false))); + elt.replace(DimpCore.buildAddressLinks(FM[a], elt.cloneNode(false))); } }); /* Set up click handlers. */ - document.observe('click', DimpFullmessage._clickHandler.bindAsEventListener(DimpFullmessage)); + document.observe('click', FM._clickHandler.bindAsEventListener(FM)); });