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

This commit is contained in:
Normann Lou 2012-02-02 13:12:08 +13:00 committed by Ingo Schommer
parent deee8a294a
commit 80a08aab60

View File

@ -92,28 +92,29 @@
togglePanel: function(bool) { togglePanel: function(bool) {
//apply or unapply the flyout formatting //apply or unapply the flyout formatting, should only apply to cms-menu-list when the current collapsed panal is the cms menu.
$('.cms-menu-list').children('li').each(function(){ if($(this).attr('id') == 'cms-menu'){
if (bool) { //expand $('.cms-menu-list').children('li').each(function(){
$(this).children('ul').each(function() { if (bool) { //expand
$(this).removeClass('collapsed-flyout'); $(this).children('ul').each(function() {
if ($(this).data('collapse')) { $(this).removeClass('collapsed-flyout');
$(this).removeData('collapse'); if ($(this).data('collapse')) {
$(this).addClass('collapse'); $(this).removeData('collapse');
} $(this).addClass('collapse');
}); }
} else { //collapse });
$(this).children('ul').each(function() { } else { //collapse
$(this).addClass('collapsed-flyout'); $(this).children('ul').each(function() {
$(this).hasClass('collapse'); $(this).addClass('collapsed-flyout');
$(this).removeClass('collapse'); $(this).hasClass('collapse');
$(this).data('collapse', true); $(this).removeClass('collapse');
}); $(this).data('collapse', true);
} });
}); }
});
this.toggleFlyoutState(bool);
this.toggleFlyoutState(bool);
}
this.toggleClass('collapsed', !bool); this.toggleClass('collapsed', !bool);
var newWidth = bool ? this.getWidthExpanded() : this.getWidthCollapsed(); var newWidth = bool ? this.getWidthExpanded() : this.getWidthCollapsed();