silverstripe-framework/admin/javascript/ModelAdmin.js

36 lines
742 B
JavaScript
Raw Normal View History

/**
* File: ModelAdmin.js
*/
(function($) {
$.entwine('ss', function($){
$('.cms-content-tools #Form_SearchForm').entwine({
onsubmit: function(e) {
//We need to trigger handleStateChange() explicitly, otherwise handleStageChange()
//doesn't called if landing from another section of cms
this.trigger('beforeSubmit');
}
});
/**
* Class: .importSpec
*
* Toggle import specifications
*/
$('.importSpec').entwine({
onmatch: function() {
this.hide();
this.find('a.detailsLink').click(function() {
$('#' + $(this).attr('href').replace(/.*#/,'')).toggle();
return false;
});
2012-05-14 01:43:36 +02:00
this._super();
},
onunmatch: function() {
this._super();
}
});
});
2012-05-14 01:43:36 +02:00
})(jQuery);