mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-15 01:01:43 +02:00
2140025c20
- Adds ES6 support via Babel - Transforms existing JavaScript to UMD modules - Adds module bundling via Browserify - Existing JavaScript converted to UMD modules - lib.js and leftandmain.js are bundled using browserify - JavaScript minifying of bundles handed by gulp
30 lines
542 B
JavaScript
30 lines
542 B
JavaScript
import $ from './jQuery';
|
|
|
|
$.entwine('ss', function($){
|
|
$('.ss-toggle').entwine({
|
|
onadd: function() {
|
|
this._super();
|
|
|
|
this.accordion({
|
|
heightStyle: "content",
|
|
collapsible: true,
|
|
active: (this.hasClass("ss-toggle-start-closed")) ? false : 0
|
|
});
|
|
},
|
|
onremove: function() {
|
|
if (this.data('accordion')) this.accordion('destroy');
|
|
this._super();
|
|
},
|
|
|
|
getTabSet: function() {
|
|
return this.closest(".ss-tabset");
|
|
},
|
|
|
|
fromTabSet: {
|
|
ontabsshow: function() {
|
|
this.accordion("resize");
|
|
}
|
|
}
|
|
});
|
|
});
|