Bugzilla – Attachment 92524 Details for
Bug 23518
Problem with borrower search autocomplete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23518: Problem with borrower search autocomplete
Bug-23518-Problem-with-borrower-search-autocomplet.patch (text/plain), 3.18 KB, created by
Katrin Fischer
on 2019-09-01 20:35:07 UTC
(
hide
)
Description:
Bug 23518: Problem with borrower search autocomplete
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-09-01 20:35:07 UTC
Size:
3.18 KB
patch
obsolete
>From 52986087ed333e374afcabd962422db5a4f7f779 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 30 Aug 2019 12:25:45 +0000 >Subject: [PATCH] Bug 23518: Problem with borrower search autocomplete > >This patch fixes a bug introduced by my patch for Bug 23405: Keyboard >navigation of patron autocomplete results was broken because I >incorrectly assumed that the autocomplete "select" action was redundant >because keyboard navigation would trigger the selected link. It doesn't! > >This patch adds the "select" action back to the autocomplete >configuration, explicitly defining a redirect to match the URL which is >followed if the user uses the mouse to click a result. > >To test you should have a patron in your database which has no card >number. Make sure CircAutocompl is enabled. > >- From the circulation home page, type a patron name in the "Check out" > form and wait for autocomplete search results to display. > >- Making a selection from the autocomplete results should work by > clicking with a mouse OR using the arrow keys and TAB or ENTER. > >- Test with patrons with and without card numbers. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc >index 1ca12ff3c6..7bff27a22d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc >@@ -87,9 +87,13 @@ > var obj = $( "#findborrower" ).autocomplete({ > source: "/cgi-bin/koha/circ/ysearch.pl", > minLength: 3, >+ select: function( event, ui ) { >+ window.location.href = ui.item.link; >+ } > }).data( "ui-autocomplete" ); > if( obj ) { > obj._renderItem = function( ul, item ) { >+ item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber; > var cardnumber = ""; > if( item.cardnumber != "" ){ > // Display card number in parentheses if it exists >@@ -97,7 +101,7 @@ > } > return $( "<li></li>" ) > .data( "ui-autocomplete-item", item ) >- .append( "<a href=\"/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) >+ .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) > .appendTo( ul ); > }; > } >-- >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 23518
:
92503
|
92504
|
92511
| 92524