mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
aa67b56b10
* Use jquery ui accordion for the field, and implemented an admin theme. * Made the setting of configuration consistent with other form fields. * ToggleComposteField->startClosed() has been deprecated in favour of setStartClosed(). * Removed public access to the heading level, instead use getHeadingLevel() or setHeadingLevel().
27 lines
500 B
JavaScript
27 lines
500 B
JavaScript
(function($){
|
|
$.entwine('ss', function($){
|
|
$('.ss-toggle').entwine({
|
|
onmatch: function() {
|
|
var self = $(this);
|
|
var opts = { collapsible: true };
|
|
var tab = self.parents(".ss-tabset");
|
|
|
|
if(self.hasClass("ss-toggle-start-closed")) {
|
|
opts.active = false;
|
|
}
|
|
|
|
if(tab.length) {
|
|
tab.bind("tabsshow", function() {
|
|
self.accordion("resize");
|
|
});
|
|
}
|
|
|
|
this.accordion(opts);
|
|
},
|
|
onunmatch: function() {
|
|
this._super();
|
|
}
|
|
});
|
|
});
|
|
})(jQuery);
|