From 5f80e50e299b03d3103d3813c88eeafbe3f22cfd Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 22 Nov 2017 15:53:42 +0000 Subject: [PATCH] Bug 19679: Move templates JavaScript to the footer: More tools templates This patch modifies more staff client tools templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. Export data Inventory Notices & slips Upload local cover image Signed-off-by: Claire Gravely --- .../intranet-tmpl/prog/en/modules/tools/export.tt | 59 ++-- .../prog/en/modules/tools/inventory.tt | 251 ++++++++-------- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 326 +++++++++++---------- .../prog/en/modules/tools/upload-images.tt | 98 ++++--- 4 files changed, 375 insertions(+), 359 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt index fc9892e..06d93a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt @@ -1,40 +1,15 @@ [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Export data [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -311,4 +286,34 @@ $(document).ready(function() { [% INCLUDE 'tools-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'calendar.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 00b8183..3cb722a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -1,133 +1,12 @@ [% USE KohaDates %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Inventory [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'calendar.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -368,4 +247,130 @@ $(document).ready(function(){ [% INCLUDE 'tools-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'calendar.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 25523ce..cae2112 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -1,171 +1,12 @@ [% USE Koha %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'letters-search.inc' %] @@ -555,4 +396,167 @@ $(document).ready(function() { [% END %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt index 28a35de..b684fb0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt @@ -1,58 +1,12 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Upload images [% INCLUDE 'doc-head-close.inc' %] - - - - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -153,4 +107,52 @@ $(document).ready(function(){ [% INCLUDE 'tools-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.1.4