2011-03-23 10:51:00 +01:00
|
|
|
/**
|
|
|
|
* File: ModelAdmin.js
|
|
|
|
*/
|
|
|
|
|
|
|
|
(function($) {
|
|
|
|
$.entwine('ss', function($){
|
2012-05-01 14:08:55 +02:00
|
|
|
$('.cms-content-tools #Form_SearchForm').entwine({
|
2012-03-13 04:29:34 +01:00
|
|
|
onsubmit: function(e) {
|
|
|
|
//We need to trigger handleStateChange() explicitly, otherwise handleStageChange()
|
|
|
|
//doesn't called if landing from another section of cms
|
|
|
|
this.trigger('beforeSubmit');
|
|
|
|
}
|
|
|
|
});
|
2011-03-23 10:51:00 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class: .importSpec
|
|
|
|
*
|
|
|
|
* Toggle import specifications
|
|
|
|
*/
|
|
|
|
$('.importSpec').entwine({
|
|
|
|
onmatch: function() {
|
2013-01-15 06:52:05 +01:00
|
|
|
this.find('div.details').hide();
|
2011-03-23 10:51:00 +01:00
|
|
|
this.find('a.detailsLink').click(function() {
|
2013-01-15 06:52:05 +01:00
|
|
|
$('#' + $(this).attr('href').replace(/.*#/,'')).slideToggle();
|
2011-03-23 10:51:00 +01:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2012-05-14 01:43:36 +02:00
|
|
|
this._super();
|
|
|
|
},
|
|
|
|
onunmatch: function() {
|
2011-03-23 10:51:00 +01:00
|
|
|
this._super();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2012-05-14 01:43:36 +02:00
|
|
|
})(jQuery);
|