mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +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);
|
if (select.value) timerAction(select.value);
|
||||||
select.value = '';
|
select.value = '';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
select.addEventListener('sl-hide', (e) => {
|
||||||
|
if (e.currentTarget.nodeName === 'ET2-SELECT')
|
||||||
|
{
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
// bind click handler
|
// bind click handler
|
||||||
timer_container.addEventListener('click', (ev) =>
|
timer_container.addEventListener('click', (ev) =>
|
||||||
{
|
{
|
||||||
select.dropdown.open = !select.dropdown.open ? true : false;
|
ev.stopImmediatePropagation();
|
||||||
ev.stopPropagation();
|
if (select.dropdown.open)
|
||||||
|
{
|
||||||
|
select.dropdown.hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
select.dropdown.show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// need to load timesheet translations for app-names
|
// need to load timesheet translations for app-names
|
||||||
this.langRequire(window, [{app: 'timesheet', lang: this.preference('lang')}], () =>
|
this.langRequire(window, [{app: 'timesheet', lang: this.preference('lang')}], () =>
|
||||||
|
@ -18,8 +18,15 @@ egw_ready.then(function()
|
|||||||
click: function(ev){
|
click: function(ev){
|
||||||
// do NOT react on bubbeling events from contained selectbox
|
// do NOT react on bubbeling events from contained selectbox
|
||||||
var select = document.getElementById('quick_add_selectbox');
|
var select = document.getElementById('quick_add_selectbox');
|
||||||
select.dropdown.open = !select.dropdown.open ? true : false;
|
ev.stopImmediatePropagation();
|
||||||
ev.stopPropagation();
|
if (select.dropdown.open)
|
||||||
|
{
|
||||||
|
select.dropdown.hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
select.dropdown.show();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user