silverstripe-blog/javascript/GridField.js
2013-08-04 17:38:26 +01:00

16 lines
381 B
JavaScript
Executable File

(function($){
$.entwine('ss', function($) {
$('.ss-gridfield .field .gridfield-dropdown').entwine({
onchange: function() {
var gridField = this.getGridField();
var state = gridField.getState().GridFieldSiteTreeAddNewButton;
state.pageType = this.val();
gridField.setState("GridFieldSiteTreeAddNewButton", state);
}
});
});
}(jQuery));