Bugzilla – Attachment 76962 Details for
Bug 21076
Javascript error on article requests page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21076: Don't call autocomplete code after patron found
Bug-21076-Dont-call-autocomplete-code-after-patron.patch (text/plain), 2.98 KB, created by
Maryse Simard
on 2018-07-13 19:28:19 UTC
(
hide
)
Description:
Bug 21076: Don't call autocomplete code after patron found
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2018-07-13 19:28:19 UTC
Size:
2.98 KB
patch
obsolete
>From 7abd064930cbebdca014fbf60faf698df34d5a20 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 13 Jul 2018 17:49:14 +0000 >Subject: [PATCH] Bug 21076: Don't call autocomplete code after patron found > >To test: >1 - Enable article requests >2 - Search on staff client >3 - Click 'Request article' >4 - Find a patron >5 - View error in console >6 - Apply patch >7 - Reload >8 - Not error is gone > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >Followed the test plan and it works. >--- > .../prog/en/modules/circ/request-article.tt | 38 ++++++++++++---------- > 1 file changed, 20 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >index ca1aa1b..94d9b33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >@@ -305,24 +305,26 @@ > }); > > $(document).ready(function() { >- $( "#patron" ).autocomplete({ >- source: "/cgi-bin/koha/circ/ysearch.pl", >- minLength: 3, >- select: function( event, ui ) { >- $( "#patron" ).val( ui.item.cardnumber ); >- $( "#holds_patronsearch" ).submit(); >- return false; >- } >- }) >- .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >- return $( "<li></li>" ) >- .data( "ui-autocomplete-item", item ) >- .append( "<a>" + item.surname + ", " + item.firstname + >- " (" + item.cardnumber + ") <small>" + item.address + >- " " + item.city + " " + item.zipcode + " " + >- item.country + "</small></a>" ) >- .appendTo( ul ); >- }; >+ [% UNLESS (patron ) %] >+ $( "#patron" ).autocomplete({ >+ source: "/cgi-bin/koha/circ/ysearch.pl", >+ minLength: 3, >+ select: function( event, ui ) { >+ $( "#patron" ).val( ui.item.cardnumber ); >+ $( "#holds_patronsearch" ).submit(); >+ return false; >+ } >+ }) >+ .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >+ return $( "<li></li>" ) >+ .data( "ui-autocomplete-item", item ) >+ .append( "<a>" + item.surname + ", " + item.firstname + >+ " (" + item.cardnumber + ") <small>" + item.address + >+ " " + item.city + " " + item.zipcode + " " + >+ item.country + "</small></a>" ) >+ .appendTo( ul ); >+ }; >+ [% END %] > > $( ".ar-update-branchcode" ).on('focus', function(){ > previous_branchcode = this.value; >-- >2.7.4
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 21076
:
76959
|
76962
|
77063