Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW Reinstated filters in ReportAdmin
- 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
- Loading branch information
Showing
3 changed files
with
78 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
/** | |||
* 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); |