From fa2c9e46edb44e2482a89315ddb0414aa40d2f58 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Wed, 1 Oct 2014 16:48:38 +0200 Subject: [PATCH] Cleanup comments and whitespaces --- public/js/icinga/behavior/navigation.js | 2 +- public/js/icinga/loader.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/public/js/icinga/behavior/navigation.js b/public/js/icinga/behavior/navigation.js index 90cda9713..67eaf6993 100644 --- a/public/js/icinga/behavior/navigation.js +++ b/public/js/icinga/behavior/navigation.js @@ -24,8 +24,8 @@ Navigation.prototype.onRendered = function(evt) { // get original source element of the rendered-event var el = evt.target; - // restore old menu state if (activeMenuId) { + // restore old menu state $('[role="navigation"] li.active', el).removeClass('active'); var $selectedMenu = $('#' + activeMenuId).addClass('active'); var $outerMenu = $selectedMenu.parent().closest('li'); diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 9c3feab6e..ae5b4b645 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -340,9 +340,7 @@ if (! req.autorefresh) { // TODO: Hook for response/url? var $forms = $('[action="' + this.icinga.utils.parseUrl(url).path + '"]'); - var $matches = $.merge($('[href="' + url + '"]'), $forms); - $matches.each(function (idx, el) { if ($(el).closest('#menu').length) { self.icinga.behaviors.navigation.resetActive(); @@ -367,7 +365,6 @@ }); } else { // TODO: next container url - // Get first container url? active = $('[href].active', req.$target).attr('href'); }