[icinga-checkins] icinga.org: icingaweb2/master: Fix navigation behavior not clearing active items properly

git at icinga.org git at icinga.org
Mon Dec 12 15:03:24 CET 2016


Module: icingaweb2
Branch: master
Commit: 67e41af30896bdece954ebdb0564b586343bb168
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=67e41af30896bdece954ebdb0564b586343bb168

Author: Eric Lippmann <eric.lippmann at icinga.com>
Date:   Mon Dec 12 15:02:28 2016 +0100

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 63f1b6e..1fc462a 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');
     };
 
     /**



More information about the icinga-checkins mailing list