From 02f46e0a27db0f72bc19e6e7fe99c78090b5f1a0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 8 Nov 2017 15:55:23 +0000 Subject: [PATCH] Bug 19592: Move admin templates JavaScript to the footer: Acquisitions This patch modifies the staff client acquisitions-related adminisration 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 cart: All button controls, DataTables functionality, tabs, etc. Signed-off-by: Simon Pouchol Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/includes/acquisitions-menu.inc | 7 - .../prog/en/modules/admin/admin-home.tt | 1 + .../prog/en/modules/admin/aqbudgetperiods.tt | 286 +++++----- .../prog/en/modules/admin/aqbudgets.tt | 516 +++++++++--------- .../prog/en/modules/admin/aqcontract.tt | 86 +-- .../prog/en/modules/admin/aqplan.tt | 114 ++-- koha-tmpl/intranet-tmpl/prog/js/acq.js | 5 + 7 files changed, 510 insertions(+), 505 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc index 6ebe510ea6..8d46d87939 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc @@ -1,10 +1,3 @@ - +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt index 66f6b9f879..cd629efd90 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt @@ -1,64 +1,11 @@ [% USE Price %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Budgets › Funds › Planning for [% budget_period_description %] by [% authcat %] [% INCLUDE 'doc-head-close.inc' %] - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'budgets-admin-search.inc' %] @@ -321,4 +268,61 @@ [% INCLUDE 'acquisitions-menu.inc' %] +[% MACRO jsinclude BLOCK %] + + + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/acq.js b/koha-tmpl/intranet-tmpl/prog/js/acq.js index 9d3983c88a..63575b34ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/js/acq.js @@ -374,3 +374,8 @@ function hideAllColumns(){ $("#plan td:nth-child(2),#plan th:nth-child(2)").nextUntil("th:nth-child("+(allCols-1)+"),td:nth-child("+(allCols-1)+")").hide(); // hide all but the last two columns $("#hideall").prop("checked", true).parent().addClass("selected"); } + +$(document).ready(function() { + var path = location.pathname.substring(1); + $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold'); +}); -- 2.39.5