Bugzilla – Attachment 105410 Details for
Bug 25615
Empty select in "Holds to pull" filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Bug-25615-Remove-empty-entries-in-the-filter-dropd.patch (text/plain), 2.07 KB, created by
Nick Clemens (kidclamp)
on 2020-05-28 11:51:26 UTC
(
hide
)
Description:
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-05-28 11:51:26 UTC
Size:
2.07 KB
patch
obsolete
>From a437f89e3a3f06cfe055a725fa43bdd77fa34a5d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 May 2020 12:11:37 +0200 >Subject: [PATCH] Bug 25615: Remove empty entries in the filter dropdowns of > "holds to pull" >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >On the "Holds to pull" view there are filters that are built on the >value of the cells. >Bug 22536 improved the ergonomic by adding a ul list, but the filters >are now broken, the ul and li tags are retrieved and put in the filter >list. > >The idea of this patch is to remove the HTML tags and skip if the value >is then empty. > >Test plan: >Place a hold on an item >Go to Home ⺠Circulation ⺠Holds to pull >Open the "libraries" filter >=> Without this patch you see empty entries >=> With this patch the filter contain only the libraries > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 1510f81ed9..08193e0179 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -276,8 +276,11 @@ > function createSelect( data ) { > data = separateData(data); > var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length; >+ var regex = /(<([^>]+)>)/ig; // Remove html tags > for ( i=0 ; i<len ; i++ ) { >- r += '<option value="'+data[i]+'">'+data[i]+'</option>'; >+ var cell_val = data[i].replace(regex, ''); >+ if ( cell_val.length < 1 ) continue; >+ r += '<option value="'+cell_val+'">'+cell_val+'</option>'; > } > return r+'</select>'; > } >-- >2.11.0
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 25615
:
105406
|
105407
| 105410