From 3e91d99a15f5882312378a06af4851cbb4237ef8 Mon Sep 17 00:00:00 2001
From: Owen Leonard
Date: Tue, 1 May 2018 13:08:18 +0000
Subject: [PATCH] Bug 20053: Drop type attribute "text/javascript" in OPAC
templates
This patch is a reimplementation of the original from Indranil Das Gupta
and the QA follow-up from Julian Maurice. Original test plan:
Conformance rules for HTML5 is generating warnings for
-
[% Asset.js("lib/modernizr.min.js") %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/greybox.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/greybox.inc
index 76cc419246..44ea957a5c 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/greybox.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/greybox.inc
@@ -1,5 +1,5 @@
[% USE Asset %]
-
[% Asset.js("lib/greybox/AJS.js") %]
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 1d91ef734f..763d090dad 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
@@ -81,13 +81,13 @@
[% Asset.js("lib/jquery/jquery.js") %]
[% Asset.js("lib/jquery/jquery-ui.js") %]
-
[% Asset.js("lib/bootstrap/js/bootstrap.min.js") %]
[% Asset.js("js/global.js") %]
-
[% IF ( OPACAmazonCoverImages || SyndeticsCoverImages ) %]
-
@@ -115,7 +115,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
[% Asset.js("lib/emoji-picker/js/jquery.emojiarea.js") %]
[% Asset.js("lib/emoji-picker/js/emoji-picker.js") %]
-
+
[% END %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %][% IF Koha.Preference( 'TagsEnabled' ) == 1 %][% Asset.js("js/tags.js") %][% END %][% ELSE %][% END %]
[% IF ( GoogleJackets ) %]
[% Asset.js("js/google-jackets.js") %]
-
[% END %]
[% IF ( GoogleIndicTransliteration ) %]
-
+
[% Asset.js("js/googleindictransliteration.js") %]
[% END %]
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
-
[% PROCESS jsinclude %]
[% IF ( OPACUserJS ) %]
-
+ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
[% INCLUDE 'datatables.inc' %]
-
+
[% END %]
@@ -1162,17 +1162,17 @@
[% IF ( LibraryThingForLibrariesID ) %]
-
+
[% END %]
[% IF ( NovelistSelectProfile && normalized_isbn ) %]
-
+
[% END %]
[% IF ( Babeltheque ) %]
-
+
[% END %]
@@ -1382,18 +1382,18 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
[% IF ( SocialNetworks ) %]
-
//
-
+
[% END %]
[% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") %][% END %]
[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") %][% END %]
-
[% IF OPACPopupAuthorsSearch %]
-
+
[% END %]
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") %][% END %]
[% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") %][% END %]
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") %]
-[% END %]
[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt
index 9ad78c3f91..a2a774d189 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt
@@ -217,7 +217,7 @@
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
-
[% IF Koha.Preference('OverDriveCirculation') %]
[% Asset.js("js/overdrive.js") %]
-
-
[% Asset.js("lib/modernizr.min.js") %]
@@ -196,7 +196,7 @@
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
-
- [% IF ( Koha.Preference('SelfCheckInUserJS') ) %][% END %]
+ [% IF ( Koha.Preference('SelfCheckInUserJS') ) %][% END %]
[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
index 349cbf5c50..0497dbdb37 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
@@ -13,7 +13,7 @@
-
[% Asset.js("lib/modernizr.min.js") %]
@@ -62,5 +62,5 @@ The Submit button only needs to be clicked if you enter the barcode manually.
[% SCOUserJS %][% END %]
+[% IF ( SCOUserJS ) %][% END %]
[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
index 48274b04f5..7d8903a765 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
@@ -16,7 +16,7 @@
-
[% Asset.js("lib/modernizr.min.js") %]
@@ -333,7 +333,7 @@
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
-
- [% IF ( Koha.Preference('SCOUserJS') ) %][% END %]
+ [% IF ( Koha.Preference('SCOUserJS') ) %][% END %]
[% END %]
--
2.20.1