mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
57c615d6b2
- Moved report table generation back to its original location in Report->getCMSFields(), in order to keep it customisable rather than duplicating it in ReportAdmin. - Using History.js to set URL state and reload panel - Namespacing filter GET parameters in order to only include them in URL state
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);
|