From c46e2fe7ac9677216543b848f4f20838e5e25d17 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 1 Dec 2017 13:53:16 +0000 Subject: [PATCH] Bug 19726: Move admin templates JavaScript to the footer: Preferences This patch modifies the staff client's system preferences 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 both the standard and local use system preferences: - WYSIWYG editor - Confirmation messages - Table sorting - Multiple selects (CoceProviders for example) Signed-off-by: Claire Gravely Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/modules/admin/preferences.tt | 93 ++++++----- .../en/modules/admin/systempreferences.tt | 152 +++++++++--------- 2 files changed, 123 insertions(+), 122 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index 7d884a7b31..2c6d6b9a0f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -1,58 +1,12 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › System preferences [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% IF ( bidi ) %] - -[% END %] - - - - - - -[%# Add WYSIWYG editor for htmlarea system preferences %] -[% INCLUDE 'wysiwyg-systempreferences.inc' %] [% INCLUDE 'header.inc' %] @@ -195,4 +149,49 @@ [% INCLUDE 'prefs-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + + + + + + + [%# Add WYSIWYG editor for htmlarea system preferences %] + [% INCLUDE 'wysiwyg-systempreferences.inc' %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt index 4f8f5117d6..d0180443fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt @@ -1,85 +1,12 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › [% IF ( add_form ) %] System preferences › [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] System preferences › Data added[% END %] [% IF ( delete_confirm ) %] System preferences › [% searchfield %] › Confirm deletion of parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] System preferences › Parameter deleted[% END %][% IF ( else ) %]System preferences[% END %] [% INCLUDE 'doc-head-close.inc' %] -[%# Add WYSIWYG editor for htmlarea system preferences %] -[% INCLUDE 'wysiwyg-systempreferences.inc' %] -[% IF ( else ) %] -[% INCLUDE 'datatables.inc' %] - -[% END %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'prefs-admin-search.inc' %] @@ -449,4 +376,79 @@ [% INCLUDE 'prefs-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [%# Add WYSIWYG editor for htmlarea system preferences %] + [% INCLUDE 'wysiwyg-systempreferences.inc' %] + [% IF ( else ) %] + [% INCLUDE 'datatables.inc' %] + + [% END %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5