Let Roundcube core handle the popup menus (#4529)
This commit is contained in:
parent
e5f37cd7cc
commit
91a484a713
1 changed files with 1 additions and 23 deletions
|
@ -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;
|
||||
|
@ -2879,25 +2876,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
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue