Bugzilla – Attachment 132648 Details for
Bug 30093
Rewrite the patron search when placing a hold with the REST API route
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 30093: Restore the autocomplete feature
bug-30093-Restore-the-autocomplete-feature.patch (text/plain), 3.55 KB, created by
Jonathan Druart
on 2022-03-30 15:22:18 UTC
(
hide
)
Description:
bug 30093: Restore the autocomplete feature
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-03-30 15:22:18 UTC
Size:
3.55 KB
patch
obsolete
>From 109000277c6efd8867150aba5e28688d7e8ce644 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 21 Feb 2022 11:56:06 +0100 >Subject: [PATCH] bug 30093: Restore the autocomplete feature > >--- > .../prog/en/modules/reserve/request.tt | 45 ++++++++++++++++--- > 1 file changed, 40 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 1e48c1b19ad..b9ad43ce467 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1145,6 +1145,12 @@ > [% Asset.js("lib/hc-sticky.js") | $raw %] > [% INCLUDE 'select2.inc' %] > [% Asset.js("js/holds.js") | $raw%] >+ >+ [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&biblionumber=") %] >+ [% IF multi_hold %] >+ [% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] >+ [% END %] >+ > <script> > var Sticky; > var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; >@@ -1503,6 +1509,40 @@ > return false; > }); > >+ [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %] >+ [% IF ( PatronAutoComplete ) %] >+ $( "#search_patron_filter" ).autocomplete({ >+ source: "/cgi-bin/koha/circ/ysearch.pl", >+ minLength: 3, >+ select: function( event, ui ) { >+ document.location.href = '/cgi-bin/koha/reserve/request.pl?[% url_biblio_params | url %]&borrowernumber=' + ui.item.borrowernumber; >+ } >+ }) >+ .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >+ return $( "<li></li>" ) >+ .data( "ui-autocomplete-item", item ) >+ .append( >+ "<a>" >+ + ( item.surname ? item.surname.escapeHtml() : "" ) >+ + ", " >+ + ( item.firstname ? item.firstname.escapeHtml() : "" ) >+ + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")" >+ + " " >+ + "<small>" >+ + ( item.address ? item.address.escapeHtml() : "" ) >+ + " " >+ + ( item.city ? item.city.escapeHtml() : "" ) >+ + " " >+ + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) >+ + " " >+ + ( item.country ? item.country.escapeHtml() : "" ) >+ + "</small>" >+ + "</a>" ) >+ .appendTo( ul ); >+ }; >+ [% END %] >+ [% END %] >+ > Sticky = $("#toolbar"); > Sticky.hcSticky({ > stickTo: "#existing_holds", >@@ -1560,11 +1600,6 @@ > table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; > </script> > >- [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&biblionumber=") %] >- [% IF multi_hold %] >- [% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] >- [% END %] >- > [% PROCESS patron_search_js > table_id => 'table_borrowers', > categories => categories, >-- >2.25.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 30093
:
130605
|
130606
|
130627
|
130628
|
130705
|
130944
|
130945
|
130946
|
131830
|
131831
|
131832
|
132537
|
132538
|
132540
|
132541
|
132542
|
132647
|
132648
|
132653
|
132654
|
132655
|
132699
|
132700
|
132701
|
132702
|
132724
|
132725
|
132726
|
132727
|
132728