From: Michael M Slusarz Date: Wed, 18 Nov 2009 19:51:21 +0000 (-0700) Subject: Add e-mail info to context menu if personal name is shown on page. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b714b00864b667fe03f96f895ea4264ab7830b07;p=horde.git Add e-mail info to context menu if personal name is shown on page. --- diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index 876f85b3a..24106a381 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -419,8 +419,27 @@ var DimpCore = { } }, - // By default, no context onShow action - contextOnShow: Prototype.emptyFunction, + contextOnShow: function(ctx_id, baseelt) + { + var tmp; + + switch (ctx_id) { + case 'ctx_contacts': + tmp = $(ctx_id).down('DIV.contactAddr'); + if (tmp) { + tmp.next().remove(); + tmp.remove(); + } + + // Add e-mail info to context menu if personal name is shown on + // page. + if (baseelt.retrieve('personal')) { + $(ctx_id).insert({ top: new Element('DIV', { className: 'sep' }) }); + $(ctx_id).insert({ top: new Element('DIV', { className: 'contactAddr' }).insert(baseelt.retrieve('email').escapeHTML()) }); + } + break; + } + }, contextOnClick: function(elt, baseelt, menu) { diff --git a/imp/themes/screen-dimp.css b/imp/themes/screen-dimp.css index 564e2602a..f9353c96b 100644 --- a/imp/themes/screen-dimp.css +++ b/imp/themes/screen-dimp.css @@ -721,6 +721,10 @@ span.attachmentImg { margin: 1px 0; padding: 0; } +.context div.contactAddr { + font-style: italic; + text-align: center; +} .contextSubmenu { background: url("graphics/popright.png") 100% 50% no-repeat; padding-left: 16px;