Bugzilla – Attachment 173800 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.41 KB, created by
Jonathan Druart
on 2024-10-31 13:42:52 UTC
(
hide
)
Description:
Bug 30397: Remove duplicate entry from length menu of patrons search
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-31 13:42:52 UTC
Size:
1.41 KB
patch
obsolete
>From f45435176a4f51e8ff69596d02063d5739059f3f 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 ] >--- > 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.34.1
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