From b02593168c8277cce9f0e1e9a2783095a2d117d3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 18 Jan 2013 09:47:55 -0500 Subject: [PATCH] Bug 9424 - Move JavaScript out of header include Content-Type: text/plain; charset="utf-8" This patch removes JavaScript "onlick" attributes from header.inc and moves the functionality to staff-global.js. This is in keeping with the idea of progressive enhancement. This patch also makes a couple of minor changes to staff-global.js to fix jsHint warnings. To test, be sure to clear your browser cache after applying the patch. Test the logout link under several conditions: - intranetbookbag enabled, virtualshelves enabled - intranetbookbag enabled, virtualshelves disabled - intranetbookbag disabled, virtualshelves enabled - intranetbookbag disabled, virtualshelves disabled Logout should be successful with no JavaScript errors. This array of tests is required because of the Cart-clearing action of logging out and the changes made in this patch to the way Car/Lists JavaScript is included. --- .../prog/en/includes/doc-head-close.inc | 31 ++++++++++---------- .../intranet-tmpl/prog/en/includes/header.inc | 8 ++--- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 25 +++++++++++++--- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index f677ed9..6ee99bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -40,25 +40,24 @@ //]]> [% END %] +[% IF ( virtualshelves || intranetbookbag ) %] - [% IF ( virtualshelves || intranetbookbag ) %] - - [% END %] + + +[% END %] [% IF LocalCoverImages %]