Do not drop preselection in the navigation on reload
This commit is contained in:
parent
157818c8e7
commit
b7c207a9cb
|
@ -159,6 +159,12 @@
|
|||
$selectedMenu = $outerMenu;
|
||||
}
|
||||
$selectedMenu.addClass('active');
|
||||
} else {
|
||||
// store menu state
|
||||
var $menus = $('[role="navigation"] li.active', el);
|
||||
if ($menus.size()) {
|
||||
activeMenuId = $menus[0].id;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -673,8 +673,12 @@
|
|||
}
|
||||
|
||||
var origFocus = document.activeElement;
|
||||
if (typeof containerId !== 'undefined' && autorefresh && origFocus && $(origFocus).closest('form').length && $container.has($(origFocus)) && $(origFocus).closest('#' + containerId).length && ! $(origFocus).hasClass('autosubmit')) {
|
||||
this.icinga.logger.debug('Not changing content, form has focus');
|
||||
if (
|
||||
// Do not reload menu when search field has content
|
||||
(containerId === 'menu' && $(origFocus).length && $(origFocus).val().length)
|
||||
// TODO: remove once #7146 is solved
|
||||
|| (containerId !== 'menu' && typeof containerId !== 'undefined' && autorefresh && origFocus && $(origFocus).closest('form').length && $container.has($(origFocus)) && $(origFocus).closest('#' + containerId).length && ! $(origFocus).hasClass('autosubmit'))) {
|
||||
this.icinga.logger.debug('Not changing content for ', containerId, ' form has focus');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue