silverstripe-blog/javascript/GridField.js

16 lines
381 B
JavaScript
Raw Normal View History

2013-08-04 18:38:26 +02:00
(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));