silverstripe-reports/javascript/ReportAdmin.js

24 lines
611 B
JavaScript
Raw Normal View History

2013-01-17 01:22:13 +01:00
/**
* File: ReportAdmin.js
*/
(function($) {
$.entwine('ss', function($){
$('.ReportAdmin .cms-edit-form').entwine({
onsubmit: function(e) {
var url = $.path.parseUrl(document.location.href).hrefNoSearch,
params = this.find(':input[name^=filters]').serializeArray();
params = $.grep(params, function(param) {return (param.value);}); // filter out empty
if(params) url = $.path.addSearchParams(url, $.param(params));
2013-01-17 01:22:13 +01:00
$('.cms-container').loadPanel(url);
return false;
}
});
2013-02-22 22:04:55 +01:00
$('.ReportAdmin').css({
'overflow-y': 'scroll',
'padding-top': 0
});
2013-01-17 01:22:13 +01:00
});
})(jQuery);