Bugzilla – Attachment 185217 Details for
Bug 40517
Allow grouping existing holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40517: (QA follow-up): Fix 'group selected' button active with just 1 hold selected
Bug-40517-QA-follow-up-Fix-group-selected-button-a.patch (text/plain), 2.16 KB, created by
Pedro Amorim
on 2025-08-07 10:56:12 UTC
(
hide
)
Description:
Bug 40517: (QA follow-up): Fix 'group selected' button active with just 1 hold selected
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-08-07 10:56:12 UTC
Size:
2.16 KB
patch
obsolete
>From b16af771163e073b7d5dfd69817c279e88dd835e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Thu, 7 Aug 2025 10:55:52 +0000 >Subject: [PATCH] Bug 40517: (QA follow-up): Fix 'group selected' button active > with just 1 hold selected > >This fixes the following bug: >1) Select 1 hold, notice the 'group selected' button is still disabled >2) Select a 2nd hold, notice the 'group selected' button becomes enabled >3) Unselect one of the holds, notice the 'group select' is kept enabled (this is wrong, it should become disabled) >--- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index bed19e2c90f..f5144804db7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -795,17 +795,18 @@ $(document).ready(function () { > $(".holds_table .select_hold:checked").length > ); > if (patron_page) { >- if ($(".holds_table .select_hold:checked").length == 0) { >- $(".cancel_selected_holds").prop("disabled", true); >- $(".suspend_selected_holds").prop("disabled", true); >- $(".group_selected_holds").prop("disabled", true); >- } else { >- if ($(".holds_table .select_hold:checked").length >= 2) { >- $(".group_selected_holds").prop("disabled", false); >- } >- $(".suspend_selected_holds").prop("disabled", false); >- $(".cancel_selected_holds").prop("disabled", false); >- } >+ var selectedHolds = $(".holds_table .select_hold:checked"); >+ var hasSelectedHolds = selectedHolds.length > 0; >+ var hasMultipleSelectedHolds = selectedHolds.length >= 2; >+ >+ $(".cancel_selected_holds, .suspend_selected_holds").prop( >+ "disabled", >+ !hasSelectedHolds >+ ); >+ $(".group_selected_holds").prop( >+ "disabled", >+ !hasMultipleSelectedHolds >+ ); > } > } > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40517
:
184640
|
184641
|
184642
|
184643
|
184644
|
184645
|
184646
|
184729
|
184732
|
184733
|
184734
|
184735
|
184736
|
184737
|
184738
|
184739
| 185217