Bugzilla – Attachment 90430 Details for
Bug 23076
Include OpacUserJS on OPAC maintenance page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23076: Include OpacUserJS on OPAC maintenance page
Bug-23076-Include-OpacUserJS-on-OPAC-maintenance-p.patch (text/plain), 1.67 KB, created by
Maryse Simard
on 2019-06-07 18:55:52 UTC
(
hide
)
Description:
Bug 23076: Include OpacUserJS on OPAC maintenance page
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2019-06-07 18:55:52 UTC
Size:
1.67 KB
patch
obsolete
>From 1c0cd33a0407553978e696d8aeac06951233fd53 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 7 Jun 2019 12:10:01 +0000 >Subject: [PATCH] Bug 23076: Include OpacUserJS on OPAC maintenance page > >This patch coverts the syntax for embedding OpacUserJS in the global >include file so that it uses 'Koha.Preference' syntax. This makes the >data available in templates, like the OPAC maintenance page, to which >the preference data has not been explicitly provided. > >To reproduce: Add some JavaScript to the OPACUserJS system preference >which will let you know it's working. For instance: > >alert("OPACUserJS!"); > >Turn on the OPAC maintenance message using the OpacMaintenance system >preference. Navigate to the OPAC. You should see the system maintenance >page but you should not see an alert. > >To test, apply the patch and reload the OPAC page. Your alert should >show. > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index ffeebcd..a8494de 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -301,11 +301,9 @@ $(document).ready(function() { > }); > </script> > [% PROCESS jsinclude %] >-[% IF ( OPACUserJS ) %] >+[% IF ( Koha.Preference('OPACUserJS') ) %] > <script> >- //<![CDATA[ >- [% OPACUserJS | $raw %] >- //]]> >+ [% Koha.Preference('OPACUserJS') | $raw %] > </script> > [% END %] > [% IF SCO_login %] >-- >2.7.4
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 23076
:
90414
|
90430
|
90431
|
90445