Bugzilla – Attachment 144092 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.82 KB, created by
Katrin Fischer
on 2022-11-19 20:14:11 UTC
(
hide
)
Description:
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-11-19 20:14:11 UTC
Size:
1.82 KB
patch
obsolete
>From ebd4443b7ea01e24e35162d5169d433f9b4066ed 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". > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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 6057cb8473..ba4f9f9b9d 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.30.2
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