From 8425ab43dde41f30d73cbcd4a781f260fcffea44 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 1 Dec 2017 15:44:59 +0000 Subject: [PATCH] Bug 19744: Move template JavaScript to the footer: Offline circulation This patch modifies the staff client offline circulation 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 modified templates: All button controls, DataTables functionality, tabs, etc. Circulation -> Built-in offline circulation interface -> Synchronize -> Download records -> Check out -> Check in -> Synchronize -> Upload transactions -> Pending offline circulations -> Check all, uncheck all -> Delete -> Process Circulation -> Upload offline circulation data -> Upload .koc file (gerated by the Koha Offline Circulation program, for instance). Signed-off-by: Simon Pouchol Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/modules/circ/offline.tt | 1141 +++++++++-------- .../prog/en/modules/offline_circ/list.tt | 107 +- .../en/modules/offline_circ/process_koc.tt | 136 +- 3 files changed, 696 insertions(+), 688 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt index 2bd1b4c05c..257a92d62d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% IF (AllowOfflineCirculation) %] [% SET manifestattr = 'manifest="/cgi-bin/koha/circ/offline-mf.pl"' %] @@ -9,576 +10,8 @@ Koha › Circulation [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - - - -[% INCLUDE 'timepicker.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -781,4 +214,574 @@ $(document).ready(function () { +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + + + + [% INCLUDE 'timepicker.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt index 2500456d41..684f8d2de0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt @@ -1,58 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE "doc-head-open.inc" %] Koha › Circulation › Offline circulation [% INCLUDE "doc-head-close.inc" %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -134,4 +85,56 @@ - [% INCLUDE 'intranet-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt index d0ec7af06e..f6c7acf05f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt @@ -1,74 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Offline circulation file upload [% INCLUDE 'doc-head-close.inc' %] - - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -128,4 +63,71 @@ function CheckForm(f) { + +[% MACRO jsinclude BLOCK %] + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5