diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2015-10-16 20:30:18 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2015-10-16 20:30:18 +0300 |
commit | 66b237f361e3b54d8be5073bbaae5feef56f7ab3 (patch) | |
tree | 17d47ab06266791b086efcd3dbcf843242845224 /plugins/CoreHome | |
parent | d6969f70ff081400540f5f8a255dfb2e1b89df61 (diff) |
refs #9030 When a given menu is expended, collapse it on toggle
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r-- | plugins/CoreHome/javascripts/menu.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/CoreHome/javascripts/menu.js b/plugins/CoreHome/javascripts/menu.js index d30e854ff3..c38e8ecc89 100644 --- a/plugins/CoreHome/javascripts/menu.js +++ b/plugins/CoreHome/javascripts/menu.js @@ -30,8 +30,13 @@ menu.prototype = if (!$('#content.admin').size()) { if (!href && $link.parent().is('.menuTab')) { var $li = $link.parents('li').first(); - $li.siblings().removeClass('sfActive'); - $li.addClass('sfActive'); + + if ($li.hasClass('sfActive')) { + $li.removeClass('sfActive'); + } else { + $li.siblings().removeClass('sfActive'); + $li.addClass('sfActive'); + } } else if (href) { broadcast.propagateAjax(href.substr(1)); @@ -161,4 +166,4 @@ menu.prototype = $('.navbar li:first ul a:first', this.menuNode).click().addClass('sfActive'); } } -};
\ No newline at end of file +}; |