From 03e01e670d14b21abc6d16d4a423e396ad3645ae Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 20 Nov 2017 17:05:10 +0000 Subject: [PATCH] Bug 19657: Move lists templates JS to the footer This patch modifies the staff client's lists 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 the lists page: All button controls, DataTables functionality, form validation, etc. Signed-off-by: Claire Gravely Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../en/includes/virtualshelves-toolbar.inc | 28 - .../prog/en/modules/virtualshelves/shelves.tt | 637 +++++++++--------- 2 files changed, 330 insertions(+), 335 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc index 0f034dc9f7..4f3c37e2f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc @@ -1,31 +1,3 @@ - -
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index ed45298df5..ea40476f29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -2,12 +2,11 @@ [% USE KohaDates %] [% SET PRIVATE = 1 %] [% SET PUBLIC = 2 %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › [% IF op == 'view' %]Lists › Contents of [% shelf.shelfname | html %][% ELSE %]Lists[% END %][% IF op == 'add_form' %] › Create new list[% END %][% IF op == 'edit_form' %] › Edit list [% shelf.shelfname | html %][% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - [% BLOCK list_permissions %]
  • @@ -28,312 +27,8 @@  
  • [% END %] - -[% IF print %] - -[% END %] - -[% IF op == 'view' %] - - -[% END %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -716,4 +411,332 @@ function AdjustRemark() { [% END %]
    + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + + [% IF print %] + + [% END %] + + [% IF op == 'view' %] + + + [% END %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5