From 4eefcaf6dad550403c5708aef65224bce65a2b8f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 28 Nov 2017 19:04:43 +0000 Subject: [PATCH] Bug 19710: Move plugins templates javascript to the footer This patch modifies the staff client plugins template 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 template: - The plugins link should be bold in the sidebar menu. - Choosing "Uninstall" for an installed plugin should trigger a confirmation alert. --- .../prog/en/modules/plugins/plugins-home.tt | 24 +++++++++++++--------- koha-tmpl/intranet-tmpl/prog/js/tools-menu.js | 2 ++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index 29b9d75..0507e15 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -1,17 +1,8 @@ [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Plugins [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - @@ -142,5 +133,18 @@ +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'calendar.inc' %] + +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js index 6a73363..1c2c64f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js +++ b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js @@ -8,6 +8,8 @@ $('#navmenulist a[href$="/cgi-bin/koha/patron_lists/lists.pl"]').css('font-weight','bold'); } else if ((path+location.search).indexOf("batchMod.pl?del=1") >= 0 ) { $('#navmenulist a[href$="/cgi-bin/koha/tools/batchMod.pl?del=1"]').css('font-weight','bold'); + } else if (path.indexOf("plugins") >= 0 ) { + $('#navmenulist a[href$="/cgi-bin/koha/plugins/plugins-home.pl?method=tool"]').css('font-weight','bold'); } else { $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold'); } -- 2.1.4