From dc915ce1f7830913753dd3ff027a2b2a1799dd42 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Jan 2017 16:12:25 +0000 Subject: [PATCH] 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 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/modules/about.tt | 18 ++++++++++-------- .../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 ddba5fd007..492aee4e4e 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 8d0e58f341..82743dddfe 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.39.5