From e15446af125d0986cc3d9f122e91b21a5e21c6f6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 2 Dec 2020 10:26:25 +0100 Subject: [PATCH] Bug 26983: Fix [un]select all links in inventory The select/unselect all links took into account only the items displayed when the page was loaded (so 20). Test plan: 1. Go to Tools-> Inventory-> Do a Search to produce more than 20 results 2. Select 50, 100 or All entries to show 3. click on Select All => All items must be selected, not only the first 20 Signed-off-by: Fridolin Somers Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index e9cdad3b3e..a6fe072d2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -397,16 +397,15 @@ return false; }); - var checkboxes = $("#inventoryt input:checkbox"); $(".checkall").click(function(e){ e.preventDefault(); - checkboxes.each(function(){ + $("#inventoryt input:checkbox").each(function(){ $(this).prop("checked", true); }); }); $(".clearall").click(function(e){ e.preventDefault(); - checkboxes.each(function(){ + $("#inventoryt input:checkbox").each(function(){ $(this).prop("checked", false); }); }); -- 2.39.5