Skip to content
Browse files

MINOR Collapsing filter breaks the main navigation (SSF-108)

  • Loading branch information...
1 parent deee8a2 commit 80a08aab60abec2bc07fb12082831bffb7ac7467 @normann normann committed with chillu
Showing with 22 additions and 21 deletions.
  1. +22 −21 admin/javascript/LeftAndMain.Panel.js
View
43 admin/javascript/LeftAndMain.Panel.js
@@ -92,28 +92,29 @@
togglePanel: function(bool) {
- //apply or unapply the flyout formatting
- $('.cms-menu-list').children('li').each(function(){
- if (bool) { //expand
- $(this).children('ul').each(function() {
- $(this).removeClass('collapsed-flyout');
- if ($(this).data('collapse')) {
- $(this).removeData('collapse');
- $(this).addClass('collapse');
- }
- });
- } else { //collapse
- $(this).children('ul').each(function() {
- $(this).addClass('collapsed-flyout');
- $(this).hasClass('collapse');
- $(this).removeClass('collapse');
- $(this).data('collapse', true);
- });
- }
- });
-
- this.toggleFlyoutState(bool);
+ //apply or unapply the flyout formatting, should only apply to cms-menu-list when the current collapsed panal is the cms menu.
+ if($(this).attr('id') == 'cms-menu'){
+ $('.cms-menu-list').children('li').each(function(){
+ if (bool) { //expand
+ $(this).children('ul').each(function() {
+ $(this).removeClass('collapsed-flyout');
+ if ($(this).data('collapse')) {
+ $(this).removeData('collapse');
+ $(this).addClass('collapse');
+ }
+ });
+ } else { //collapse
+ $(this).children('ul').each(function() {
+ $(this).addClass('collapsed-flyout');
+ $(this).hasClass('collapse');
+ $(this).removeClass('collapse');
+ $(this).data('collapse', true);
+ });
+ }
+ });
+ this.toggleFlyoutState(bool);
+ }
this.toggleClass('collapsed', !bool);
var newWidth = bool ? this.getWidthExpanded() : this.getWidthCollapsed();

0 comments on commit 80a08aa

Please sign in to comment.
Something went wrong with that request. Please try again.