Bug 22979: Remove type attribute from script tags: Authorities
authorOwen Leonard <oleonard@myacpl.org>
Thu, 23 May 2019 15:54:07 +0000 (15:54 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 30 May 2019 10:26:22 +0000 (10:26 +0000)
This patch removes the "type" attribute from <script> tags in several
authorities templates. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Authorities -> Search -> View authority record
 - Authorities -> Search -> Edit authority record
 - Cataloging -> New record
   - Trigger the authority search form by clicking the plugin link next
     to a tag which has been linked to an authority type (e.g. 100a ->
     Personal name).
   - Search for an authority record.
   - Select an authority record.

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=22797

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt

index 493703b..621e5d7 100644 (file)
@@ -13,7 +13,7 @@
 [% INCLUDE 'auth-finder-search.inc' %]
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript">
+    <script>
         var index = "[% index | html %]";
         var authtypecode = "[% authtypecode | html %]";
     </script>
index d16e587..51f4b2a 100644 (file)
@@ -6,8 +6,7 @@
 [% Asset.js("lib/hc-sticky.js") | $raw %]
 [% Asset.js("js/cataloging.js") | $raw %]
 
-<script type="text/javascript">
-//<![CDATA[
+<script>
     $(window).load(function(){
         $("#loading").hide();
     });
@@ -157,7 +156,6 @@ function confirmnotdup(redirect){
     $("#confirm_not_duplicate").attr("value","1");
     Check();
 }
-//]]>
 </script>
 [% Asset.css("css/addbiblio.css") | $raw %]
 
index 2b022d6..b9635b3 100644 (file)
@@ -16,7 +16,7 @@
         </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript">
+    <script>
         $(document).ready(function(){
             [% IF rancor %]
             function RancorReplaceField( new_text, ind_1, ind_2 ){
index 0739df4..9fddd71 100644 (file)
     [% IF ( displayhierarchy ) %]
         [% Asset.js("lib/jquery/plugins/jquery.jstree.js") | $raw %]
     [% END %]
-    <script type="text/javascript">
+    <script>
         $(document).ready(function() {
             $('#authoritiestabs').tabs();
             [% IF ( displayhierarchy ) %]
index b50ebbc..21c6e24 100644 (file)
     </div>
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript">
+    <script>
         var index = "[% index | html %]";
         var authtypecode = "[% authtypecode | html %]";
     </script>
     [% Asset.js("js/auth-finder-search.js") | $raw %]
-    <script type="text/javascript">
+    <script>
 
         function jumpfull(page){
             window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top');