1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-25 07:41:30 +02:00

Fix ProcessPageLister issue where it was resetting filters sometimes when it shouldn't

This commit is contained in:
Ryan Cramer
2019-07-21 07:11:42 -04:00
parent 960998cb46
commit ddc72b3aff
3 changed files with 7 additions and 5 deletions

View File

@@ -168,7 +168,7 @@ var ProcessLister = {
ProcessLister.spinner.fadeIn('fast');
var submitData = {
filters: refreshAll ? ProcessLister.filters.val() : '',
filters: refreshAll ? ProcessLister.filters.val() : 'ignore',
columns: $('#lister_columns').val(),
sort: $('#lister_sort').val()
};
@@ -185,7 +185,9 @@ var ProcessLister = {
}
if(ProcessLister.refreshRowPageIDs.length > 0) {
submitData['row_page_id'] = ProcessLister.refreshRowPageIDs.join(',');
var rowPageIDs = ProcessLister.refreshRowPageIDs.join(',');
if(rowPageIDs.indexOf(',') === 0) rowPageIDs = rowPageIDs.replace(/^,+/, ''); // ltrim
submitData['row_page_id'] = rowPageIDs;
ProcessLister.resetTotal = false;
}

File diff suppressed because one or more lines are too long

View File

@@ -580,7 +580,8 @@ class ProcessPageLister extends Process implements ConfigurableModule {
*/
protected function processInput() {
if($this->input->post('filters') !== null) {
$filters = $this->input->post('filters');
if($filters !== null && $filters !== 'ignore') {
$is = $this->getInputfieldSelector();
$is->processInput($this->input->post);
$selector = $this->sessionGet("selector");
@@ -589,7 +590,6 @@ class ProcessPageLister extends Process implements ConfigurableModule {
$this->sessionSet("pageNum", 1);
$this->wire('input')->setPageNum(1);
}
}
if($this->input->post('columns') !== null && !in_array('disableColumns', $this->toggles)) {