mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
Fix topmenu dropdowns click handler
This commit is contained in:
parent
a09d833a07
commit
2ed1a12617
@ -158,11 +158,25 @@ egw.extend('timer', egw.MODULE_GLOBAL, function()
|
||||
if (select.value) timerAction(select.value);
|
||||
select.value = '';
|
||||
});
|
||||
|
||||
select.addEventListener('sl-hide', (e) => {
|
||||
if (e.currentTarget.nodeName === 'ET2-SELECT')
|
||||
{
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
// bind click handler
|
||||
timer_container.addEventListener('click', (ev) =>
|
||||
{
|
||||
select.dropdown.open = !select.dropdown.open ? true : false;
|
||||
ev.stopPropagation();
|
||||
ev.stopImmediatePropagation();
|
||||
if (select.dropdown.open)
|
||||
{
|
||||
select.dropdown.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
select.dropdown.show();
|
||||
}
|
||||
});
|
||||
// need to load timesheet translations for app-names
|
||||
this.langRequire(window, [{app: 'timesheet', lang: this.preference('lang')}], () =>
|
||||
|
@ -18,8 +18,15 @@ egw_ready.then(function()
|
||||
click: function(ev){
|
||||
// do NOT react on bubbeling events from contained selectbox
|
||||
var select = document.getElementById('quick_add_selectbox');
|
||||
select.dropdown.open = !select.dropdown.open ? true : false;
|
||||
ev.stopPropagation();
|
||||
ev.stopImmediatePropagation();
|
||||
if (select.dropdown.open)
|
||||
{
|
||||
select.dropdown.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
select.dropdown.show();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user