Bugzilla – Attachment 173887 Details for
Bug 30397
Duplicate '20' option in dropdown 'Show entries' menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30397: Remove duplicate entry from length menu of patrons search
Bug-30397-Remove-duplicate-entry-from-length-menu-.patch (text/plain), 1.51 KB, created by
Lucas Gass (lukeg)
on 2024-11-01 18:03:33 UTC
(
hide
)
Description:
Bug 30397: Remove duplicate entry from length menu of patrons search
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-11-01 18:03:33 UTC
Size:
1.51 KB
patch
obsolete
>From 35b4355bb86d2f42d64bd386081a5764956b11eb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 31 Oct 2024 14:41:19 +0100 >Subject: [PATCH] Bug 30397: Remove duplicate entry from length menu of patrons > search > >If you have 20 in PatronsPerPage, there will be two 20 entries in the >length menu of the patrons search. >jQuery.unique is stupid it seems, it requires the array to be sorted (?) > >let x = [1, 2, 1, 2] >jQuery.unique(x); >Array(4) [ 1, 2, 1, 2 ] > >x = [1, 1, 2, 2] >jQuery.unique(x); >Array [ 1, 2 ] > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index d2eef529c7c..ed5516f05de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -347,9 +347,8 @@ > > // Build the aLengthMenu > let aLengthMenu = [ >- [% Koha.Preference('PatronsPerPage') | html %], 10, 20, 50, 100, -1 >+ ...new Set([[% Koha.Preference('PatronsPerPage') | html %], 10, 20, 50, 100, -1]) > ]; >- jQuery.unique(aLengthMenu); > aLengthMenu.sort(function( a, b ){ > // Put "All" at the end > if ( a == -1 ) { >-- >2.39.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 30397
:
173800
|
173838
| 173887