Browse Source

Bug 32672: Incorrect CSS path to jquery-ui

This patch removes links to jQueryUI assets which are not required in
the self-checkout and self-checkin pages.

The patch also adds missing JS to the self-checkin page related to
internationalization. This prevents a JS error related to an undefined
function, "__".

To test, apply the patch and view the main pages in self-checkout and
self-checkin, and the help page in self checkout. There should be no
errors in the browser console related to missing files.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23.05.x
Owen Leonard 1 year ago
committed by Tomas Cohen Arazi
parent
commit
410b9ee35f
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 8
      koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt
  2. 1
      koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
  3. 2
      koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt

8
koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt

@ -35,17 +35,21 @@
<link rel="shortcut icon" href="[% interface | html %]/[% theme | html %]/images/favicon.ico" type="image/x-icon" />
[% END %]
[% IF ( bidi ) %]
[% Asset.css("lib/jquery/jquery-ui-rtl-1.13.1.min.css") | $raw %]
[% Asset.css("css/sco-rtl.css") | $raw %]
[% ELSE %]
[% Asset.css("lib/jquery/jquery-ui-1.13.1.css") | $raw %]
[% Asset.css("css/sco.css") | $raw %]
[% END %]
[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
[% IF ( Koha.Preference('SelfCheckInUserCSS') ) %]<style>[% Koha.Preference('SelfCheckInUserCSS') | $raw %]</style>[% END %]
<script>
var Koha = {};
function _(s) { return s } // dummy function for gettext
</script>
[% IF lang && lang != 'en' %]
[% Asset.js(lang _ '/js/locale_data.js') | $raw %]
[% END %]
[% Asset.js('js/Gettext.js') | $raw %]
[% Asset.js('js/i18n.js') | $raw %]
</head>
<body id="sci_main" class="sci" onload="dofocus();" onunload="mungeHistory();">
[% INCLUDE 'masthead-sci.inc' %]

1
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt

@ -7,7 +7,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
<link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') | url %][% ELSE %][% interface | html %]/[% theme | html %]/images/favicon.ico[% END %]" type="image/x-icon" />
[% Asset.css("lib/jquery/jquery-ui-1.13.1.css") | $raw %]
[% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %]
[% Asset.css("css/sco.css") | $raw %]
[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]

2
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt

@ -16,10 +16,8 @@
[% END %]
[% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %]
[% IF ( bidi ) %]
[% Asset.css("lib/jquery/jquery-ui-rtl-1.13.1.min.css") | $raw %]
[% Asset.css("css/sco-rtl.css") | $raw %]
[% ELSE %]
[% Asset.css("lib/jquery/jquery-ui-1.13.1.css") | $raw %]
[% Asset.css("css/sco.css") | $raw %]
[% END %]
[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]

Loading…
Cancel
Save