Bugzilla – Attachment 140923 Details for
Bug 31566
'Patrons selected' counter doubles on 'Select all'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31566: 'Patrons selected' counter doubles on 'Select all'
Bug-31566-Patrons-selected-counter-doubles-on-Sele.patch (text/plain), 2.34 KB, created by
Owen Leonard
on 2022-09-23 15:26:37 UTC
(
hide
)
Description:
Bug 31566: 'Patrons selected' counter doubles on 'Select all'
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-09-23 15:26:37 UTC
Size:
2.34 KB
patch
obsolete
>From 53e6596dbaccb772705ab52681effb1317773ebf Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 23 Sep 2022 15:22:34 +0000 >Subject: [PATCH] Bug 31566: 'Patrons selected' counter doubles on 'Select all' > >This patch refines the JavaScript which is run when the "Select all" >or "Clear all" controls are clicked. The script now checks to see >whether the checkbox is checked before triggering the change function. > >To test, apply the patch and perform a patron search in the staff >interface which will return multiple results. > >- After the patron search results are displayed, test the "Select > all" control. The visible search results should all be checked, > and the "Patrons selected" counter at the top should be > incremented correctly. >- Clicking the "Select all" control again should have no effect. > The "Patrons selected" counter should not increment again. >- Test the "Clear all" control to confirm that checkboxes are > unchecked and the counter updates correctly. >- Test with multiple pages of patron search results to confirm > that the controls work correctly on any page of results.. >--- > .../intranet-tmpl/prog/en/modules/members/member.tt | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 747920f760..4fee56f65f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -252,11 +252,19 @@ > > $("#select_all").on("click",function(e){ > e.preventDefault(); >- $(".selection").prop("checked", true).change(); >+ $(".selection").each(function(){ >+ if( $(this).prop("checked") == false ){ >+ $(this).prop( "checked", true ).change(); >+ } >+ }); > }); > $("#clear_all").on("click",function(e){ > e.preventDefault(); >- $(".selection").prop("checked", false).change(); >+ $(".selection").each(function(){ >+ if( $(this).prop("checked") ){ >+ $(this).prop("checked", false ).change(); >+ } >+ }); > }); > > [% IF searchmember %] >-- >2.30.2
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 31566
:
140923
|
140959
|
141016