silverstripe-framework/admin/javascript/src/LeftAndMain.TreeDropdownField.js
David Craig 2140025c20 Implement RFC-7 JavaScript module loader
- 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
2016-01-26 11:39:20 +13:00

17 lines
371 B
JavaScript

import $ from 'jQuery';
$.entwine('ss', function($){
// Any TreeDowndownField needs to refresh it's contents after a form submission,
// because the tree on the backend might have changed
$('.TreeDropdownField').entwine({
'from .cms-container form': {
onaftersubmitform: function(e){
this.find('.tree-holder').empty();
this._super();
}
}
});
});