From 1de703b509589981be563fd81beab816195782dc Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 1 Jul 2019 13:16:42 -0300 Subject: [PATCH] Bug 23246: Only jump into the 'images' tab HTML5MediaEnabled is set This patch makes jumping into the third tab happen only if HTML5MediaEnabled is set to 'both' or 'staff'. To test: - Have HTML5MediaEnabled set to 'opac' or 'not at all' - Open the detail page of a record with no holdings => FAIL: The 'images' tab is selected - Apply this patch - Reload => SUCCESS: The 'holdings' tab is selected as it should be. - Sign off :-D Sponsored-by: America Numismatic Society Signed-off-by: Maryse Simard Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 7a9d8937f753685471dfde7a62c5871062d41a11) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index ef3e2a9b5a..e21d1d7221 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -902,9 +902,9 @@ $(document).ready(function() { $('#bibliodetails').tabs(); - [% IF count == 0 %] - $('#bibliodetails').tabs("option", "active", 3); - [% END %] + [% IF count == 0 and ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) %] + $('#bibliodetails').tabs("option", "active", 3); + [% END %] $('#search-form').focus(); $('.thumbnails > li > .remove').click(function() { var result = confirm(_("Are you sure you want to delete this cover image?")); -- 2.39.5