From d29eff1b7b3ca4e89bc61a47c1c657f2297e81c9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 9 Nov 2017 13:53:19 +0000 Subject: [PATCH] Bug 19601: Move admin templates JavaScript to the footer: Additional parameters This patch modifies the staff client "additional parameters" administration 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 page: All button controls, DataTables functionality, tabs, etc. Signed-off-by: Simon Pouchol Signed-off-by: Josef Moravec --- .../prog/en/modules/admin/audio_alerts.tt | 17 ++- .../prog/en/modules/admin/columns_settings.tt | 36 ++--- .../prog/en/modules/admin/didyoumean.tt | 98 +++++++------- .../prog/en/modules/admin/sms_providers.tt | 21 +-- .../prog/en/modules/admin/usage_statistics.tt | 83 ++++++------ .../prog/en/modules/admin/z3950servers.tt | 147 +++++++++++---------- 6 files changed, 213 insertions(+), 189 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt index a1d3309..0ebf15f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt @@ -1,13 +1,8 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Audio alerts [% INCLUDE 'doc-head-close.inc' %] - - @@ -135,4 +130,14 @@ [% INCLUDE 'admin-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt index 884cc77..d7faa30 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% SET panel_id = 0 %] [% BLOCK pagelist %]
@@ -87,22 +88,8 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Columns settings [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'prefs-admin-search.inc' %] @@ -176,4 +163,23 @@ [% INCLUDE 'admin-menu.inc' %]
+ +[% MACRO jsinclude BLOCK %] + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt index fa4e52b..9604316 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% BLOCK pluginlist %]
[% FOREACH plugin IN plugins %] @@ -21,53 +22,8 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Did you mean? [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'prefs-admin-search.inc' %] @@ -110,4 +66,54 @@ [% INCLUDE 'admin-menu.inc' %]
+ +[% MACRO jsinclude BLOCK %] + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt index c974417..15c4de2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt @@ -1,15 +1,7 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › SMS cellular providers [% INCLUDE 'doc-head-close.inc' %] - - @@ -102,4 +94,15 @@ + +[% MACRO jsinclude BLOCK %] + + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt index f210049..6ae0314 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt @@ -1,44 +1,11 @@ +[% SET footerjs = 1 %] [% USE Koha %] [% USE KohaDates %] [% USE Price %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Koha usage statistics [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - - - @@ -252,8 +219,46 @@ Cancel + + +
+[% INCLUDE 'admin-menu.inc' %] +
+ + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + + + - - - -
-[% INCLUDE 'admin-menu.inc' %] -
- +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt index d25cc36..f610cd4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% BLOCK ServerType %] @@ -16,79 +17,9 @@ [% IF op == 'list' %] - [% INCLUDE 'datatables.inc' %] [% END %] - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'z3950-admin-search.inc' %] @@ -265,4 +196,78 @@ [% INCLUDE 'admin-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% IF op == 'list' %] + [% INCLUDE 'datatables.inc' %] + [% END %] + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] -- 2.1.4