mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
bb432fcc68
commit
70d7f7f669
@ -42,21 +42,21 @@
|
|||||||
Navigation.prototype = new Icinga.EventListener();
|
Navigation.prototype = new Icinga.EventListener();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply the menu selection and hovering according to the current state
|
* Activate menu items if their class is set to active or if the current URL matches their link
|
||||||
*
|
*
|
||||||
* @param evt {Object} The event context
|
* @param {Object} e Event
|
||||||
*/
|
*/
|
||||||
Navigation.prototype.onRendered = function(evt) {
|
Navigation.prototype.onRendered = function(e) {
|
||||||
var _this = evt.data.self;
|
var _this = e.data.self;
|
||||||
|
|
||||||
this.element = evt.target;
|
this.element = e.target;
|
||||||
|
|
||||||
if (! _this.active) {
|
if (! _this.active) {
|
||||||
// There is no stored menu item, therefore it is assumed that this is the first rendering
|
// There is no stored menu item, therefore it is assumed that this is the first rendering
|
||||||
// of the navigation after the page has been opened.
|
// of the navigation after the page has been opened.
|
||||||
|
|
||||||
// initialise the menu selected by the backend as active.
|
// initialise the menu selected by the backend as active.
|
||||||
var $menus = $('#menu li.active', evt.target);
|
var $menus = $('#menu li.active', e.target);
|
||||||
if ($menus.size()) {
|
if ($menus.size()) {
|
||||||
$menus.each(function () {
|
$menus.each(function () {
|
||||||
_this.setActive($(this));
|
_this.setActive($(this));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user