From b9a3d143a8c18a1f4614e1b0537891cf4eff568a 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 (cherry picked from commit e15446af125d0986cc3d9f122e91b21a5e21c6f6) Signed-off-by: Fridolin Somers (cherry picked from commit 1ca4cbf0762e5c47d3efa5a0310cbbfa70add2d2) Signed-off-by: Andrew Fuerste-Henry --- 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 2db78af6bd..70a643fb23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -350,16 +350,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