From 9d1ba3487d167bda878069c9f0269ebba64ab30d Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Mon, 3 Aug 2020 07:37:10 +0000 Subject: [PATCH] Bug 24201: (QA follow-up) Remove setdesk variable and add desk selection script only on pages in need Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/includes/js_includes.inc | 3 --- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 5 ++--- .../intranet-tmpl/prog/en/modules/circ/set-library.tt | 11 ++++++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc index cb2ca00860..1acf1834c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -25,9 +25,6 @@ [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %] [% Asset.js("js/staff-global.js") | $raw %] -[% IF setdesk %] -[% Asset.js("js/desk_selection.js") | $raw %] -[% END %] [% INCLUDE 'validator-strings.inc' %] [% IF ( IntranetUserJS ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 2ae79935f4..b3650f8de2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -1,12 +1,10 @@ [% USE raw %] +[% USE Asset %] [% USE Koha %] [% USE Branches %] [% USE Desks %] [% USE Categories %] [% SET footerjs = 1 %] -[% IF Desks.all %] - [% SET setdesk = 1 %] -[% END %] [% INCLUDE 'doc-head-open.inc' %] Koha › [% IF ( nopermission ) %]Access denied[% END %] @@ -137,6 +135,7 @@ </div> [% MACRO jsinclude BLOCK %] + [% Asset.js("js/desk_selection.js") | $raw %] <script type="text/javascript"> $(document).ready( function() { if ( document.location.hash ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt index c511a0b23f..1384a6d5c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt @@ -1,9 +1,9 @@ +[% USE raw %] +[% USE Asset %] [% USE Branches %] [% USE Desks %] [% USE Koha %] -[% IF Desks.all %] - [% SET setdesk = 1 %] -[% END %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] <title>Koha › Circulation › Set library [% INCLUDE 'doc-head-close.inc' %] @@ -112,4 +112,9 @@ Updated:
    + +[% MACRO jsinclude BLOCK %] + [% Asset.js("js/desk_selection.js") | $raw %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5