mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-28 13:36:12 +02:00
The accordion widget was previously being passed true and false, where as it either expects true or the integer of the panel to show. This fix sets it as either false or 0.
28 lines
489 B
JavaScript
28 lines
489 B
JavaScript
(function($){
|
|
$.entwine('ss', function($){
|
|
$('.ss-toggle').entwine({
|
|
onadd: function() {
|
|
this.accordion({
|
|
collapsible: true,
|
|
active: (this.hasClass("ss-toggle-start-closed")) ? false : 0
|
|
});
|
|
|
|
this._super();
|
|
},
|
|
onremove: function() {
|
|
this.accordion('destroy');
|
|
},
|
|
|
|
getTabSet: function() {
|
|
return this.closest(".ss-tabset");
|
|
},
|
|
|
|
fromTabSet: {
|
|
ontabsshow: function() {
|
|
this.accordion("resize");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(jQuery);
|