Bugzilla – Attachment 92709 Details for
Bug 23575
Template error causes item search to be submitted multiple times
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23575: Template error causes item search to be submitted multiple times
Bug-23575-Template-error-causes-item-search-to-be-.patch (text/plain), 2.10 KB, created by
Lucas Gass (lukeg)
on 2019-09-11 13:02:40 UTC
(
hide
)
Description:
Bug 23575: Template error causes item search to be submitted multiple times
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2019-09-11 13:02:40 UTC
Size:
2.10 KB
patch
obsolete
>From 2e1154a23c6fd078109c1f046c478cfdd62b0522 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 9 Sep 2019 16:58:04 +0000 >Subject: [PATCH] Bug 23575: Template error causes item search to be submitted > multiple times > >This patch corrects the item search template so that the submit handler >is not nested inside an unrelated loop. The change should have no >outward effect on the behavior of the item search other than making it >faster. > >To observe the bug in action, open your browser's developer tools and >click the "Network" tab. Filter the output to only "XHR" and perform an >item search. You should see multiple requests. > >To test, apply the patch and perform an item search. It should behave >normally. > >Check the browser's "Network" monitor again to verify that only one >request is being sent. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index a220e1c4f8..7adecfe6ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -457,15 +457,16 @@ > } > } > }); >- $('#itemsearchform').submit(function() { >- var searchform = $(this); >- var format = searchform.find('input[name="format"]:checked').val(); >- if (format == 'html') { >+ }); >+ >+ $('#itemsearchform').submit(function() { >+ var searchform = $(this); >+ var format = searchform.find('input[name="format"]:checked').val(); >+ if (format == 'html') { > submitForm(searchform); > $("#item-search-block").hide(); > return false; >- } >- }); >+ } > }); > }); > </script> >-- >2.11.0
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 23575
:
92672
|
92709
|
92820
|
92822