From bea80f33de823dcf6e7f2e7fedb153df4d26243d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 5 Dec 2017 17:17:15 +0000 Subject: [PATCH] Bug 19754: Move template JavaScript to the footer: Acquisitions, part 2 This patch modifies some staff client acquisitions 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. - Acquisitions -> Invoices - Datepickers - Search for invoices - Datatable - Acquisitions -> Late orders - Datepickers, datatables, selection controls (when searching by vendor) - Acquisitions -> Vendor -> Basket -> Add to basket -> From an existing record -> Search - Datatables, View MARC modal - Acquisitions -> Vendor -> Basket -> Add to basket -> From a new (empty) record - Form validation, inactive fund control, add users to notify on receiving. - Acquisitions -> Vendor -> Basket -> Add to basket -> From a subscription -> Search - Datatables, show only renewed, show/hide search form - Acquisitions -> Vendor -> Basket -> Add to basket -> From a suggestion - Datatables, "Show" controls - Acquisitions - "Ordered" link in table of funds - Datatables - Acquisitions -> Vendor -> Receive shipment -> Invoice -> Receive - Datepickers, item add form plugins (test with AcqCreateItem set to 'receiving an order.' Signed-off-by: Claire Gravely --- .../prog/en/modules/acqui/invoices.tt | 161 ++++----- .../prog/en/modules/acqui/lateorders.tt | 128 +++---- .../prog/en/modules/acqui/neworderbiblio.tt | 57 +-- .../prog/en/modules/acqui/neworderempty.tt | 389 ++++++++++----------- .../prog/en/modules/acqui/newordersubscription.tt | 67 ++-- .../prog/en/modules/acqui/newordersuggestion.tt | 49 +-- .../intranet-tmpl/prog/en/modules/acqui/ordered.tt | 33 +- .../prog/en/modules/acqui/orderreceive.tt | 237 +++++++------ 8 files changed, 576 insertions(+), 545 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index 765b46c..79cbc6a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -1,89 +1,11 @@ [% USE KohaDates %] [% USE Branches %] - +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Invoices [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'calendar.inc' %] - @@ -367,4 +289,85 @@ $(document).ready(function() { [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'calendar.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 97797ad..4c142a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -1,73 +1,13 @@ [% USE KohaDates %] [% USE Branches %] [% USE ColumnsSettings %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Late orders [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] - -[% INCLUDE 'calendar.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -249,4 +189,68 @@ $(document).ready(function() { [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + + [% INCLUDE 'calendar.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt index 3f96abc..5d9a0ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt @@ -1,34 +1,10 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Search existing records [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -129,4 +105,33 @@ [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 3bad339..f9b4a15 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -1,203 +1,11 @@ +[% USE Koha %] [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -[% USE Koha %] Koha › Acquisitions › Basket [% basketno %] › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %] [% INCLUDE 'doc-head-close.inc' %] - - -[% INCLUDE 'additem.js.inc' %] - - - - + [% INCLUDE 'header.inc' %] @@ -679,4 +487,195 @@ $(document).ready(function() [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + [% INCLUDE 'additem.js.inc' %] + + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index 8af7639..38491d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -1,42 +1,13 @@ [% USE KohaDates %] [% USE Branches %] [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Serials [% biblionumber %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -123,4 +94,38 @@ [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt index 1274b47..a8f9c41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt @@ -1,30 +1,10 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Add order from a suggestion [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'suggestions-add-search.inc' %] @@ -92,4 +72,29 @@ [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt index 1007e5c..e7c3040 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -1,24 +1,12 @@ [% USE KohaDates %] [% USE ItemTypes %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Ordered [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -106,4 +94,21 @@ [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index cd52267..8ec42ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -1,126 +1,12 @@ [% USE KohaDates %] [% USE Branches %] [% USE Price %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Receipt summary for : [% name %] [% IF ( invoice ) %]invoice, [% invoice %][% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'additem.js.inc' %] - - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -374,4 +260,123 @@ [% INCLUDE 'acquisitions-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% INCLUDE 'calendar.inc' %] + [% INCLUDE 'additem.js.inc' %] + + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.1.4