From 67e41af30896bdece954ebdb0564b586343bb168 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 12 Dec 2016 15:02:28 +0100 Subject: [PATCH] Fix navigation behavior not clearing active items properly --- public/js/icinga/behavior/navigation.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/public/js/icinga/behavior/navigation.js b/public/js/icinga/behavior/navigation.js index 63f1b6e40..1fc462aab 100644 --- a/public/js/icinga/behavior/navigation.js +++ b/public/js/icinga/behavior/navigation.js @@ -49,9 +49,7 @@ Navigation.prototype.onRendered = function(e) { var _this = e.data.self; - if (! _this.$menu) { - _this.$menu = $(e.target); - } + _this.$menu = $(e.target); if (! _this.active) { // There is no stored menu item, therefore it is assumed that this is the first rendering @@ -180,11 +178,7 @@ * Remove all active elements */ Navigation.prototype.clear = function() { - // menu items - this.$menu.find('li.active').removeClass('active'); - - // search fields - this.$menu.find('input.active').removeClass('active'); + this.$menu.find('.active').removeClass('active'); }; /**