Bugzilla – Attachment 99631 Details for
Bug 24713
JavaScript error on staff client catalog search results page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24713: JavaScript error on staff client catalog search results page
Bug-24713-JavaScript-error-on-staff-client-catalog.patch (text/plain), 2.60 KB, created by
David Nind
on 2020-02-26 08:48:29 UTC
(
hide
)
Description:
Bug 24713: JavaScript error on staff client catalog search results page
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-02-26 08:48:29 UTC
Size:
2.60 KB
patch
obsolete
>From 4d0677401b59e46466ebee8be22ddb4a9907c3da Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 25 Feb 2020 18:08:59 +0000 >Subject: [PATCH] Bug 24713: JavaScript error on staff client catalog search > results page > >This patch modifies the output of template toolkit variables so that >values in the in-page JavaScript are quoted. This avoids JavaScript >errors when the template variable is empty. > >To test, apply the patch and perform a catalog search in the staff >client. Use the browser's developer tool to check for JavaScript errors >in the console. There should be none. > >Test with AmazonCoverImages both on and off. > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 6616d6a4a9..211b4164e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -680,14 +680,14 @@ > <script> > var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); > var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold."); >- var PREF_AmazonCoverImages = parseInt( [% Koha.Preference('AmazonCoverImages') | html %], 10); >+ var PREF_AmazonCoverImages = parseInt( "[% Koha.Preference('AmazonCoverImages') | html %]", 10); > var q_array = new Array(); // will hold search terms, if present >- var PREF_LocalCoverImages = parseInt( [% Koha.Preference('LocalCoverImages') | html %], 10); >- var PREF_IntranetCoce = parseInt( [% Koha.Preference('IntranetCoce') | html %], 10); >+ var PREF_LocalCoverImages = parseInt( "[% Koha.Preference('LocalCoverImages') | html %]", 10); >+ var PREF_IntranetCoce = parseInt( "[% Koha.Preference('IntranetCoce') | html %]", 10); > var PREF_CoceProviders = "[% Koha.Preference('CoceProviders') | html %]"; > var CoceHost = "[% CoceHost | html %]"; > var CoceProviders = "[% CoceProviders | html %]"; >- var PREF_BrowseResultSelection = parseInt( [% Koha.Preference('BrowseResultSelection') | html %], 10); >+ var PREF_BrowseResultSelection = parseInt( "[% Koha.Preference('BrowseResultSelection') | html %]", 10); > var PREF_NotHighlightedWords = "[% Koha.Preference('NotHighlightedWords') | html %]"; > var biblionumber = "[% biblionumber | html %]"; > var holdfor_cardnumber = "[% holdfor_cardnumber | html %]"; >-- >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 24713
:
99461
|
99604
|
99631
|
100218