Bugzilla – Attachment 144057 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.77 KB, created by
Owen Leonard
on 2022-11-18 12:05:46 UTC
(
hide
)
Description:
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-11-18 12:05:46 UTC
Size:
1.77 KB
patch
obsolete
>From 4e00441068c397b35819399ea01d23f5b175a023 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> >--- > 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.20.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