diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-10-12 11:54:25 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-10-12 11:54:25 +0000 |
| commit | 875c86dd1efeba957b5d7d130e9195ded774241e (patch) | |
| tree | b177562d8d6c3125a59de85e9627878a77d574b5 | |
| parent | a6f38ae792776f3593d7dc7345707ac7c358ccb5 (diff) | |
- Add possibility to auto-register menu objects in show_popup()
git-svn-id: https://svn.roundcube.net/trunk@5335 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/skins/default/functions.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index 32c0a7368..6f22bb6c2 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/skins/default/functions.js @@ -108,8 +108,13 @@ function rcube_mail_ui() rcube_mail_ui.prototype = { -show_popup: function(popup, show) +show_popup: function(popup, show, config) { + var obj; + // auto-register menu object + if (!this.popups[popup] && (obj = $('#'+popup)) && obj.length) + this.popups[popup] = $.extend(config, {id: popup, obj: obj}); + if (typeof this[popup] == 'function') return this[popup](show); else @@ -141,7 +146,7 @@ show_popupmenu: function(popup, show) } obj[show?'show':'hide'](); - + if (bw.ie6 && this.popups[popup].overlap) { $('select').css('visibility', show?'hidden':'inherit'); $('select', obj).css('visibility', 'inherit'); |
