mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT: Close filter panel(Track#7210)
Make the filter panel closed every time unless explicitly opened. This commit is dependent on a commit to the CMS that adds a class to the template.
This commit is contained in:
parent
3ccaa1f864
commit
af5bd4d750
@ -56,7 +56,13 @@
|
|||||||
if(typeof cookieCollapsed != 'undefined' && cookieCollapsed != null) collapsed = (cookieCollapsed == 'true');
|
if(typeof cookieCollapsed != 'undefined' && cookieCollapsed != null) collapsed = (cookieCollapsed == 'true');
|
||||||
}
|
}
|
||||||
if(typeof collapsed == 'undefined') collapsed = jQuery(this).hasClass('collapsed');
|
if(typeof collapsed == 'undefined') collapsed = jQuery(this).hasClass('collapsed');
|
||||||
this.togglePanel(!collapsed, true);
|
|
||||||
|
//Set the filter to be closed
|
||||||
|
if (this.hasClass('filter')) {
|
||||||
|
this.togglePanel(collapsed, true);
|
||||||
|
} else {
|
||||||
|
this.togglePanel(!collapsed, true);
|
||||||
|
}
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user