From 5c310a6051174e4765c86f155cb09bdb82b3891a 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. --- .../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 ++-- .../intranet-tmpl/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 6ebe510..8d46d87 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 66f6b9f..cd629ef 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 9d3983c..63575b3 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.1.4