Bugzilla – Attachment 88568 Details for
Bug 21784
Clean up js_includes.inc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21784: Clean up js_includes.inc
Bug-21784-Clean-up-jsincludesinc.patch (text/plain), 3.42 KB, created by
Katrin Fischer
on 2019-04-23 21:25:59 UTC
(
hide
)
Description:
Bug 21784: Clean up js_includes.inc
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-23 21:25:59 UTC
Size:
3.42 KB
patch
obsolete
>From b1d8aa7d5b33f792e37463a7723fa64026c97466 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 7 Nov 2018 18:55:57 +0000 >Subject: [PATCH] Bug 21784: Clean up js_includes.inc > >This patch cleans up js_includes.inc by removing script "type" >attributes which are now invalid HTML. The patch also removes "CDATA" >markers from script blocks. They have been unnecessary since we stopped >using an XHTML doctype. > >To test, apply the patch and look at various pages in the staff client >to confirm that no JavaScript-driven interactions are broken. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/includes/js_includes.inc | 26 ++++++++-------------- > 1 file changed, 9 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc >index 6c02936bef..f91f734788 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc >@@ -4,7 +4,7 @@ > [% USE To %] > [%# Prevent XFS attacks -%] > [% UNLESS popup %] >- <script type="text/javascript"> >+ <script> > if (self === top) { > var antiClickjack = document.getElementById("antiClickjack"); > antiClickjack.parentNode.removeChild(antiClickjack); >@@ -28,16 +28,13 @@ > > [% INCLUDE 'validator-strings.inc' %] > [% IF ( IntranetUserJS ) %] >- <script type="text/javascript"> >- //<![CDATA[ >+ <script> > [% IntranetUserJS | $raw %] >- //]]> > </script> > [% END %] > > [% IF ( virtualshelves || intranetbookbag ) %] >-<script type="text/javascript"> >- //<![CDATA[ >+ <script> > var MSG_BASKET_EMPTY = _("Your cart is currently empty"); > var MSG_RECORD_IN_BASKET = _("This item is already in your cart"); > var MSG_RECORD_ADDED = _("This item has been added to your cart"); >@@ -52,7 +49,6 @@ > var MSG_ITEM_NOT_IN_CART = _("Add to cart"); > var MSG_ITEM_IN_CART = _("In your cart"); > var MSG_RECORD_REMOVED = _("The item has been removed from your cart"); >- //]]> > </script> > > [% Asset.js("js/basket.js") | $raw %] >@@ -60,19 +56,15 @@ > > [% IF LocalCoverImages %] > [% Asset.js("js/localcovers.js") | $raw %] >- <script type="text/javascript"> >- //<![CDATA[ >- var NO_LOCAL_JACKET = _("No cover image available"); >- //]]> >+ <script> >+ var NO_LOCAL_JACKET = _("No cover image available"); > </script> > [% END %] > > [% IF Koha.Preference('AudioAlerts') || AudioAlertsPage %] >- <script type="text/javascript"> >- //<![CDATA[ >- var AUDIO_ALERT_PATH = '[% interface | html %]/[% theme | html %]/sound/'; >- var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" ); >- //]]> >+ <script> >+ var AUDIO_ALERT_PATH = '[% interface | html %]/[% theme | html %]/sound/'; >+ var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" ); > > $( document ).ready(function() { > if ( AUDIO_ALERTS ) { >@@ -90,7 +82,7 @@ > > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] > [% IF ( CircAutocompl ) %] >- <script type="text/javascript"> >+ <script> > $(document).ready(function(){ > var obj = $( "#findborrower" ).autocomplete({ > source: "/cgi-bin/koha/circ/ysearch.pl", >-- >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 21784
:
82044
|
88528
| 88568