mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-27 13:06:04 +02:00
28 lines
476 B
JavaScript
28 lines
476 B
JavaScript
(function($){
|
|
$.entwine('ss', function($){
|
|
$('.ss-toggle').entwine({
|
|
onadd: function() {
|
|
this.accordion({
|
|
collapsible: true,
|
|
active: !this.hasClass("ss-toggle-start-closed")
|
|
});
|
|
|
|
this._super();
|
|
},
|
|
onremove: function() {
|
|
this.accordion('destroy');
|
|
},
|
|
|
|
getTabSet: function() {
|
|
return this.closest(".ss-tabset");
|
|
},
|
|
|
|
fromTabSet: {
|
|
ontabsshow: function() {
|
|
this.accordion("resize");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(jQuery);
|