summaryrefslogtreecommitdiff
path: root/plugins/tasklist
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-09 13:23:29 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-09 13:23:29 (GMT)
commit91a484a713f2e58e32c99d93aefe2f9b6fc2468d (patch)
treefdc612cf263a6305aac51b22b03fc6f66c1b3a39 /plugins/tasklist
parente5f37cd7cc54bb0f7e4021b5ad5ef8618dbd01e9 (diff)
downloadroundcubemail-plugins-kolab-91a484a713f2e58e32c99d93aefe2f9b6fc2468d.tar.gz
Let Roundcube core handle the popup menus (#4529)
Diffstat (limited to 'plugins/tasklist')
-rw-r--r--plugins/tasklist/tasklist.js24
1 files changed, 1 insertions, 23 deletions
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 7021016..34cd97c 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -604,9 +604,6 @@ function rcube_tasklist_ui(settings)
return false;
});
- // handle global document clicks: close popup menus
- $(document.body).click(clear_popups);
-
// extended datepicker settings
var extended_datepicker_settings = $.extend({
showButtonPanel: true,
@@ -1778,7 +1775,7 @@ function rcube_tasklist_ui(settings)
return $.grep(oldies, function(cls) { return cls.indexOf('status-') === 0 }).join(' ');
});
- if (!(rec = listdata[id]) || clear_popups({}))
+ if (!(rec = listdata[id]) || (rcmail.menu_stack && rcmail.menu_stack.length > 0))
return;
me.selected_task = rec;
@@ -2880,25 +2877,6 @@ function rcube_tasklist_ui(settings)
}
/**
- * Hide all open popup menus
- */
- function clear_popups(e)
- {
- var count = 0, target = e.target;
- if (target && target.className == 'inner')
- target = e.target.parentNode;
-
- $('.popupmenu:visible').each(function(i, elem){
- var menu = $(elem), id = elem.id;
- if (id && target.id != id+'link' && (!menu.data('sticky') || !target_overlaps(e.target, elem))) {
- menu.hide();
- count++;
- }
- });
- return count;
- }
-
- /**
* Check whether the event target is a descentand of the given element
*/
function target_overlaps(target, elem)