mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge branch '4.13' into 4
This commit is contained in:
commit
aa3d0a3b6a
@ -3,16 +3,31 @@
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
$.entwine('ss', function($){
|
||||
$('.ReportAdmin .cms-edit-form').entwine({
|
||||
$.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));
|
||||
$('.cms-container').loadPanel(url);
|
||||
return false;
|
||||
let url = $.path.parseUrl(document.location.href).hrefNoSearch;
|
||||
let params = this.find(":input[name^=filters]").serializeArray();
|
||||
|
||||
try {
|
||||
params = $.grep(params, function (param) {
|
||||
// filter out empty
|
||||
return param.value;
|
||||
});
|
||||
|
||||
// convert params to a query string
|
||||
params = $.param(params);
|
||||
|
||||
// append query string to url
|
||||
url += "?" + params;
|
||||
|
||||
$(".cms-container").loadPanel(url);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user