Bugzilla – Attachment 144048 Details for
Bug 32260
Prevent alert when searching patron (autocomplete)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Bug-32260-Patron-autocomplete---Do-not-display-an-.patch (text/plain), 1.72 KB, created by
Jonathan Druart
on 2022-11-18 09:06:34 UTC
(
hide
)
Description:
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-11-18 09:06:34 UTC
Size:
1.72 KB
patch
obsolete
>From a5fe3d18b2ab47ad90c72fbcd01259b203896d80 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 18 Nov 2022 08:00:24 +0100 >Subject: [PATCH] Bug 32260: Patron autocomplete - Do not display an alert if > request is rejected > >Not sure what is going on exactly, neither if this patch is the correct >way to fix this. >The request is "rejected" at some point (by the browser?), when we >search for patrons using the autocomplete and DT "at the same time". > >To recreate: >Don't apply this patch >Go to /cgi-bin/koha/reserve/request.pl?biblionumber=1&borrowernumber=5 >Search for "edn" then hit enter >You may see an alert, that will disappear >If you don't see the alert, repeat > >This patch suggests to ignore the alert if the status of the request is >"rejected". >--- > koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js b/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js >index 4189a2df1db..5f0aeb55592 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js >@@ -45,8 +45,10 @@ function patron_autocomplete(node, options) { > success: function(data) { > return response(data); > }, >- error: function() { >- alert( _("An error occurred. Check the logs") ); >+ error: function(e) { >+ if ( e.state() != 'rejected' ) { >+ alert( _("An error occurred. Check the logs") ); >+ } > return response(); > } > }); >-- >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 32260
:
144048
|
144057
|
144092