Skip to content

Commit

Permalink
Merge pull request kitodo#6360 from effective-webwork/fix-filter-editing
Browse files Browse the repository at this point in the history
Do not update results while editing filter
  • Loading branch information
solth authored Jan 7, 2025
2 parents 3eb63da + 927954d commit 0a43615
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Kitodo/src/main/webapp/WEB-INF/resources/js/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* For the full copyright and license information, please read the
* GPL3-License.txt file that was distributed with this source code.
*/
/* globals removeFilter, updateSuggestions, submitFilters, filterKeydownEvents */
/* globals removeFilter, removeFilterForEdit, updateSuggestions, submitFilters, filterKeydownEvents */

/* Define identifiers used to select elements */
const FILTER_INPUT_FORM = "#filterInputForm";
Expand Down Expand Up @@ -192,7 +192,7 @@ $(document).ready(function () {
let filter = target.siblings(".plainFilter").length ? target.siblings(".plainFilter").first().text()
: target.find(".plainFilter").first().text();
$(FILTER_INPUT).val(filter);
removeFilter([{name: "plainFilter", value: filter}]);
removeFilterForEdit([{name: "plainFilter", value: filter}]);
$(FILTER_INPUT).focus();
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
update="processesTabView:processesForm:processesTable
parsedFiltersForm:parsedFilters
processCount"/>
<p:remoteCommand name="removeFilterForEdit"
action="#{ProcessForm.filterMenu.removeFilter}"
oncomplete="setFilterInputPadding()"
update="parsedFiltersForm:parsedFilters"/>
<p:remoteCommand name="updateSuggestions"
action="#{ProcessForm.filterMenu.updateSuggestions}"
update="filterOptionsForm:suggestions"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
action="#{CurrentTaskForm.filterMenu.removeFilter}"
oncomplete="setFilterInputPadding()"
update="tasksTabView:tasksForm:taskTable parsedFiltersForm:parsedFilters"/>
<p:remoteCommand name="removeFilterForEdit"
action="#{CurrentTaskForm.filterMenu.removeFilter}"
oncomplete="setFilterInputPadding()"
update="parsedFiltersForm:parsedFilters"/>
<p:remoteCommand name="updateSuggestions"
action="#{CurrentTaskForm.filterMenu.updateSuggestions}"
update="filterOptionsForm:suggestions"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
action="#{UserForm.filterMenu.removeFilter}"
oncomplete="setFilterInputPadding()"
update="usersTabView:usersTable parsedFiltersForm:parsedFilters"/>
<p:remoteCommand name="removeFilterForEdit"
action="#{UserForm.filterMenu.removeFilter}"
oncomplete="setFilterInputPadding()"
update="parsedFiltersForm:parsedFilters"/>
<p:remoteCommand name="updateSuggestions"
action="#{UserForm.filterMenu.updateSuggestions}"
update="filterOptionsForm:suggestions"/>
Expand Down

0 comments on commit 0a43615

Please sign in to comment.