From cc4cf2bde45a91ba94980182f40b8c3894f5a11b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 6 Dec 2017 15:52:37 +0000 Subject: [PATCH] Bug 19758: Move template JavaScript to the footer: Serials, part 1 This patch modifies some staff client serials 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. - Serials -> New subscription - Search for a vendor - "Choose" link and "Cancel" button should work correctly - Search for record - "Choose" link and "Cancel" button should word correctly - Serials -> Add subscription fields - Datatable, delete confirmation - Edit - Form validation (submit both authorised value and MARC field) - Serials -> Check expiration - Date picker in search form - Search - Renew button triggers popup - Serials -> Claims -> Search results - Date picker, datatable, form validation - Select all/none; Download claims Signed-off-by: Claire Gravely Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../en/modules/serials/acqui-search-result.tt | 38 +-- .../prog/en/modules/serials/acqui-search.tt | 11 +- .../prog/en/modules/serials/add_fields.tt | 67 ++--- .../en/modules/serials/checkexpiration.tt | 36 +-- .../prog/en/modules/serials/claims.tt | 242 +++++++++--------- .../prog/en/modules/serials/result.tt | 37 +-- 6 files changed, 217 insertions(+), 214 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt index ccd6cfa59c..3ee8266476 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt @@ -1,24 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Serials › Select vendor [% INCLUDE 'doc-head-close.inc' %] - +
@@ -55,4 +40,23 @@ $(document).ready(function(){
+[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search.tt index b3f113f622..db09180d7d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search.tt @@ -1,17 +1,8 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Serials › Search for vendor [% INCLUDE 'doc-head-close.inc' %] - +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt index c74bf15c0f..e356bbeb12 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt @@ -1,4 +1,5 @@ [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Serials › Manage new fields for subscriptions [% IF op == "list" %] › List of fields @@ -10,38 +11,6 @@ [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE "datatables.inc" %] - @@ -172,4 +141,38 @@ [% INCLUDE 'serials-menu.inc' %]
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE "datatables.inc" %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt index 8a59bbedc2..3ceb99c7ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt @@ -1,26 +1,11 @@ [% USE Branches %] [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Serials › Check expiration [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'serials-search.inc' %] @@ -128,4 +113,21 @@ [% INCLUDE 'serials-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index a140ebbc55..eb001f4b43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -1,130 +1,12 @@ +[% USE AuthorisedValues %] [% USE Branches %] - +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -[% USE AuthorisedValues %] Koha › Serials › Claims [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'serials-search.inc' %] @@ -321,4 +203,122 @@ [% INCLUDE 'serials-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt index 2c5a14f34e..1c0c97adc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt @@ -1,24 +1,9 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Serials › Search results [% INCLUDE 'doc-head-close.inc' %] - +
@@ -79,4 +64,22 @@
+[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5