From e8c38e671027bcccd37ce33461dd7f2c6ecbfbfa Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 11 Oct 2018 09:06:50 +0200 Subject: [PATCH] ui: cleanups in previous --- src/opnsense/www/js/opnsense_theme.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/opnsense/www/js/opnsense_theme.js b/src/opnsense/www/js/opnsense_theme.js index c52a31327..13717e493 100644 --- a/src/opnsense/www/js/opnsense_theme.js +++ b/src/opnsense/www/js/opnsense_theme.js @@ -106,14 +106,15 @@ $(document).ready(function () { var events = { mouseenter: function() { $("#navigation.col-sidebar-left").css("width", "415px"); - if ($(this).next("div").hasClass("in")) { - } else if ($(this).next().is("a")) { - $(this).nextAll("a").prevAll("a").addClass("collapsed").attr("aria-expanded","false"); - $(this).nextAll("div").prevAll("div").removeClass("in").attr("aria-expanded","false"); - } else { - $(this).trigger("click"); - } - }, + if ($(this).next("div").hasClass("in")) { + /* no action needed */ + } else if ($(this).next().is("a")) { + $(this).nextAll("a").prevAll("a").addClass("collapsed").attr("aria-expanded","false"); + $(this).nextAll("div").prevAll("div").removeClass("in").attr("aria-expanded","false"); + } else { + $(this).trigger("click"); + } + }, mouseleave: function() { $("#navigation.col-sidebar-left").css("width", "70px"); },