From 915cdb517c125ebfedb32a40ff74978a3cd8ce65 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 --- koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 3 --- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 5 ++--- koha-tmpl/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 32e78165ee..f56faebea8 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 8d115f8661..c4dbb13bd9 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: