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 <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Tomás Cohen Arazi 2019-07-01 13:16:42 -03:00 committed by Martin Renvoize
parent 9fa2818899
commit 142a0235ad
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -936,9 +936,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?"));