diff --git a/Kitodo/src/main/webapp/WEB-INF/resources/js/lists.js b/Kitodo/src/main/webapp/WEB-INF/resources/js/lists.js index 37b9bd11fdb..e26429b9fae 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/js/lists.js +++ b/Kitodo/src/main/webapp/WEB-INF/resources/js/lists.js @@ -9,8 +9,9 @@ * GPL3-License.txt file that was distributed with this source code. */ -/*global PF*/ +/*global PF, PrimeFaces*/ /*eslint new-cap: ["error", { "capIsNewExceptionPattern": "^PF" }]*/ +/*eslint wrap-iife: ["error", "any"]*/ function registerRowToggleEvents(event) { // add listener to expanded rows @@ -34,7 +35,7 @@ function registerRowToggleEvents(event) { PrimeFaces.widget.DataTable.prototype.updateData = (function () { let cachedFunction = PrimeFaces.widget.DataTable.prototype.updateData; return function () { - let reselectAll = (typeof this.selection !== undefined && this.selection[0] === '@all'); + let reselectAll = (typeof this.selection !== "undefined" && this.selection[0] === '@all'); let result = cachedFunction.apply(this, arguments); if (reselectAll) { this.selectAllRows(); @@ -55,7 +56,7 @@ $(document).on("click", ".allSelectable .ui-chkbox-all .ui-chkbox-box", function $(document).on("click", ".allSelectable .ui-chkbox .ui-chkbox-box", function () { let tableId = $(this).closest(".allSelectable").attr('id').split(":").at(-1); let table = new PF(tableId); - if (typeof table.selection !== undefined && table.selection[0] === '@all') { + if (typeof table.selection !== "undefined" && table.selection[0] === '@all') { table.unselectAllRows(); } }); \ No newline at end of file