@@ -, +, @@ - 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. --- koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ a/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 $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; } --