Bugzilla – Attachment 187797 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.22 KB, created by
Pedro Amorim
on 2025-10-13 08:34:53 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-10-13 08:34:53 UTC
Size:
2.22 KB
patch
obsolete
>From 959abab5ccc074486bf926e537567fb39bb8908f 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) > >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >--- > 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 9c29734e3f4..93108133a8d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -807,17 +807,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
|
186672
|
186673
|
186674
|
186675
|
186676
|
186677
|
186678
|
186679
|
186680
|
186745
|
186746
|
186747
|
186748
|
186749
|
186750
|
186751
|
186752
|
186753
|
187789
|
187790
|
187791
|
187792
|
187793
|
187794
|
187795
|
187796
|
187797
|
187801
|
187802
|
187803
|
187804
|
187805
|
187806
|
187807
|
187808
|
187809
|
187810
|
187811
|
187812
|
187965
|
187966
|
187967
|
187968
|
187969
|
187970
|
187971
|
187972
|
187973
|
187974
|
187975
|
187976
|
188293
|
188294
|
188343
|
188422