From d564648f11d0bfb0f9224841372924f7d0c7bf58 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 5 Dec 2017 18:30:08 +0000 Subject: [PATCH] Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3 This patch modifies even more 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 -> Vendor -> Vendor details - Contracts datatable - Edit vendor - Add contacts, form validation - Acquisitions -> Vendor -> Invoices -> Invoice -> "Go to receipt" - Datatables, MARC and Card previews - Transfer - Confirmation of transfer, window closes - Acquisitions -> Vendor -> Receive shipments - Datatables, date pickers - Acquisitions -> Available funds table -> Spent report - Datatables - Acquisitions -> Vendor -> Uncertain prices - Datatables, form validation - Acquisitions -> Vendor -> Basket -> Add to basket from external source - Select and clear all on search form - Search results - Datatables, MARC and Card previews, in-table pop-up controls (click any table cell) Signed-off-by: Claire Gravely Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 267 ++++++++++----------- .../intranet-tmpl/prog/en/modules/acqui/parcels.tt | 61 ++--- .../intranet-tmpl/prog/en/modules/acqui/spent.tt | 33 +-- .../prog/en/modules/acqui/supplier.tt | 154 ++++++------ .../prog/en/modules/acqui/transferorder.tt | 47 ++-- .../prog/en/modules/acqui/uncertainprice.tt | 45 ++-- .../prog/en/modules/acqui/z3950_search.tt | 78 +++--- 7 files changed, 350 insertions(+), 335 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index ee4d8d6..f805193 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -2,146 +2,14 @@ [% USE KohaDates %] [% USE Price %] [% USE currency = format('%.2f') -%] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( date ) %] Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -546,4 +414,135 @@ [% 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/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt index 33e7a8d..50a8496 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -1,37 +1,11 @@ [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Receive shipment from vendor [% name %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -225,4 +199,35 @@ [% END %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt index 0b1bdc6..94810fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -1,24 +1,12 @@ [% USE KohaDates %] [% USE ItemTypes %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Spent [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -114,4 +102,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/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 07954a3..f928cc4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -85,86 +85,13 @@ [% END %] [% END %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Vendor [% name %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -422,4 +349,81 @@ function delete_contact(ev) { [% INCLUDE 'vendor-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt index 9d06740..d36bc18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Transfer order [%- USE KohaDates -%] @@ -5,29 +6,8 @@ -[% IF transferred %] - -[% END %] - -[% IF ( bookselleridfrom ) %] - -[% END %] - - +
@@ -149,5 +129,24 @@
- - + +[% MACRO jsinclude BLOCK %] + [% IF transferred %] + + [% END %] + + [% IF ( bookselleridfrom ) %] + + [% END %] +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt index d916c80..47190da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -1,29 +1,11 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -154,4 +136,27 @@ var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the p [% INCLUDE 'vendor-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index ddf104a..98ff748 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -1,45 +1,8 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source › Search results[% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - - -[% INCLUDE 'z3950_search.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'acquisitions-search.inc' %] @@ -222,6 +186,40 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% IF ( numberpending ) %]

Still [% numberpending %] servers to search

[% END %] - - +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + + + [% INCLUDE 'z3950_search.inc' %] + +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file -- 2.1.4