silverstripe-framework/admin/client/src/legacy/LeftAndMain.TreeDropdownField.js
2016-07-13 14:33:19 +12:00

17 lines
393 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();
}
}
});
});