mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-09-07 10:11:37 +02:00
19 lines
486 B
JavaScript
19 lines
486 B
JavaScript
|
/**
|
||
|
* File: ReportAdmin.js
|
||
|
*/
|
||
|
|
||
|
(function($) {
|
||
|
$.entwine('ss', function($){
|
||
|
$('.ReportAdmin .cms-edit-form').entwine({
|
||
|
onsubmit: function(e) {
|
||
|
var url = document.location.href, 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;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
})(jQuery);
|