silverstripe-cms/javascript/ReportAdmin.js
Stig Lindqvist 1625d126c2 BUG Report admin don't listen to filters
It seems like filter params that are added to the url are added in a bad way

Currently

    ?0[name]=filters[ContentReviewOwnerID]&0[value]=1

Expected:

    ?filters[ContentReviewOwnerID]=1
2014-02-25 17:20:25 +13:00

20 lines
531 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, $.param(params));
$('.cms-container').loadPanel(url);
return false;
}
});
});
})(jQuery);