From 09de289c9770c2727093ff81ee4c76a5a14a88a7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Jan 2017 16:12:25 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 17859 - Move JavaScript to the footer on about and auth pages This patch modifies the about page and the login page templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test each page to confirm that JavaScript-based interactions are unaffected: - On the About page tabs and header menu dropdowns should work correctly Signed-off-by: Josef Moravec --- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 18 ++++++++++-------- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index ddba5fd..492aee4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -1,14 +1,7 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › About Koha [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] @@ -896,4 +889,13 @@ + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 8d0e58f..82743dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -1,4 +1,5 @@ [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › [% IF ( nopermission ) %]Access denied[% END %] @@ -103,12 +104,14 @@ </div> </div> -<script> -$(document).ready( function() { - if ( document.location.hash ) { - $( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' ); - } -} ); -</script> - +[% MACRO jsinclude BLOCK %] + <script type="text/javascript"> + $(document).ready( function() { + if ( document.location.hash ) { + $( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' ); + } + }); + </script> +[% END %] +<!-- the main div is closed in intranet-bottom.inc --> [% INCLUDE 'intranet-bottom.inc' %] -- 2.1.4