mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
navigation.js: Only activate visible items or config menu items
This commit is contained in:
parent
db2c30d418
commit
1e143244e2
@ -221,8 +221,19 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Navigation.prototype.setActiveAndSelected = function ($el) {
|
Navigation.prototype.setActiveAndSelected = function ($el) {
|
||||||
this.setActive($el);
|
if ($el.length > 1) {
|
||||||
this.setSelected($el);
|
$el.each(el => {
|
||||||
|
if (! this.active) {
|
||||||
|
this.setActiveAndSelected($(el));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if ($el.length) {
|
||||||
|
if ($el[0].offsetWidth || $el[0].offsetHeight || $el.closest('.config-menu').length) {
|
||||||
|
// It's either a visible menu item or a config menu item
|
||||||
|
this.setActive($el);
|
||||||
|
this.setSelected($el);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user