mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
28 lines
515 B
JavaScript
28 lines
515 B
JavaScript
(function($){
|
|
$.entwine('ss', function($){
|
|
$('.ss-toggle').entwine({
|
|
onadd: function() {
|
|
opts = {collapsible: true};
|
|
if (this.hasClass("ss-toggle-start-closed")) opts.active = false;
|
|
|
|
this.accordion({ collapsible: true });
|
|
|
|
this._super();
|
|
},
|
|
onremove: function() {
|
|
this.accordion('destroy');
|
|
},
|
|
|
|
getTabSet: function() {
|
|
return this.closest(".ss-tabset");
|
|
},
|
|
|
|
fromTabSet: {
|
|
ontabsshow: function() {
|
|
this.accordion("resize");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(jQuery);
|