From 38495461731c69a4034c83b8b4c6f052708bf388 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 --- .../prog/en/modules/admin/preferences.tt | 93 +++++++------ .../prog/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 7d884a7..2c6d6b9 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 4f8f511..d018044 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.1.4