From 1e40274411a667e2bdbfc5417638c8a75d6e390b 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 Signed-off-by: Jonathan Druart --- .../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 a1d330988e..0ebf15f8d0 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 884cc7713f..d7faa30a76 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 fa4e52b92b..96043164ea 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 c9744173ee..15c4de2ed5 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 f210049577..6ae031409a 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 d25cc364a5..f610cd47ad 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.39.5