Cleanup Dropdowns handling

This commit is contained in:
the-djmaze 2022-03-08 10:52:08 +01:00
parent ffcd9990eb
commit 04f4538700
5 changed files with 14 additions and 14 deletions

9
dev/bootstrap.js vendored
View file

@ -1,4 +1,4 @@
import { dropdownVisibility, Settings } from 'Common/Globals';
import { Settings } from 'Common/Globals';
import { i18n } from 'Common/Translator';
import { root } from 'Common/Links';
@ -18,13 +18,6 @@ export default App => {
}
};
rl.Dropdowns = [];
rl.Dropdowns.register = function(element) { this.push(element); };
rl.Dropdowns.detectVisibility = (() =>
dropdownVisibility(!!rl.Dropdowns.find(item => item.classList.contains('show')))
).debounce(50);
addEventListener('click', ()=>rl.Dropdowns.detectVisibility());
rl.route = {
root: () => {
rl.route.off();