plugins/tasklist
Thomas Brüderli
bruederli at kolabsys.com
Mon Feb 9 14:29:24 CET 2015
plugins/tasklist/tasklist.js | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
New commits:
commit 91a484a713f2e58e32c99d93aefe2f9b6fc2468d
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Mon Feb 9 14:23:29 2015 +0100
Let Roundcube core handle the popup menus (#4529)
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)
More information about the commits
mailing list