From 336e7faaf451ff29d43a4a557861fbc8511c8e5e Mon Sep 17 00:00:00 2001 From: Maksim Sen Date: Mon, 12 Mar 2018 16:15:30 -0400 Subject: [PATCH] Bug 20376: Make select/unselect all ignore disabled checkboxes on batch record deletion Test Plan: 0.1 - find at least one biblionumber that has at least one item checked out 0.2 - find at least one biblionumber that has zero items checked out. 1 - Go into the module "Tools > Batch record deletion" 2 - in "List of biblionumbers or authority ids (one per line)" put the values you found in step 0.1 and 0.2 3 - click continue 4 - biblionumbers with at least one item checked out should not be clickable. 5 - biblionumbers with zero items checked out should be clickable. 6 - click "Select all" and "Clear all", both buttons should change the "checked" status of the enabled AND disabled biblionumber checkboxes. 7 - apply patch 8 - click "Select all" and "Clear all", both buttons should change the "checked" status of ONLY the enabled biblionumber checkboxes. Signed-off-by: JM Broust Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Conflicts: koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt Signed-off-by: Nick Clemens --- .../prog/en/modules/tools/batch_delete_records.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt index 06805e3263..868aea2327 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt @@ -11,11 +11,11 @@ var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item $(document).ready(function() { $("#selectall").click(function(e){ e.preventDefault(); - $(".records").checkCheckboxes(); + $(".records").checkCheckboxes(":input[type='checkbox']:not(:disabled)"); }); $("#clearall").click(function(e){ e.preventDefault(); - $(".records").unCheckCheckboxes(); + $(".records").unCheckCheckboxes(":input[type='checkbox']:not(:disabled)"); }); $("#selectwithoutitems").click(function(e){ e.preventDefault(); -- 2.39.5