mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Collapsing filter breaks the main navigation (SSF-108)
This commit is contained in:
parent
deee8a294a
commit
80a08aab60
@ -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();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user