silverstripe-reports/javascript/ReportAdmin.js
2013-02-23 10:04:55 +13:00

24 lines
602 B
JavaScript

/**
* 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, params);
$('.cms-container').loadPanel(url);
return false;
}
});
$('.ReportAdmin').css({
'overflow-y': 'scroll',
'padding-top': 0
});
});
})(jQuery);