diff --git a/code/web/interface/themes/responsive/CollectionSpotlight/collectionSpotlightTabs.tpl b/code/web/interface/themes/responsive/CollectionSpotlight/collectionSpotlightTabs.tpl index 548db93796..e608260922 100644 --- a/code/web/interface/themes/responsive/CollectionSpotlight/collectionSpotlightTabs.tpl +++ b/code/web/interface/themes/responsive/CollectionSpotlight/collectionSpotlightTabs.tpl @@ -28,7 +28,7 @@ @@ -74,6 +74,11 @@ {/if} {/if} + {assign var="tabClasses" value="tab-pane" } + {if $active} + {assign var="tabClasses" value="$tabClasses active" } + {/if} + {if $collectionSpotlight->style == 'horizontal'} {include file='CollectionSpotlight/titleScroller.tpl'} {elseif $collectionSpotlight->style == 'horizontal-carousel'} @@ -107,6 +112,7 @@ $(document).ready(function(){ldelim} {if count($collectionSpotlight->lists) > 1 && (!isset($collectionSpotlight->listDisplayType) || $collectionSpotlight->listDisplayType == 'tabs')} + applyTabsSwitcher(); $('#collectionSpotlight{$collectionSpotlight->id} a[data-toggle="tab"]').on('shown.bs.tab', function (e) {ldelim} showList($(e.target).data('index')); {rdelim}); @@ -135,7 +141,7 @@ var selectedOption = availableLists.options[availableLists.selectedIndex]; var selectedList = selectedOption.value; - $("#collectionSpotlight{$collectionSpotlight->id} .titleScroller.active").removeClass('active').hide(); + $("#collectionSpotlight{$collectionSpotlight->id} .active").removeClass('active').hide(); $("#" + selectedList).addClass('active').show(); // update view more link with data.url for the selectedOption showList(availableLists.selectedIndex); @@ -175,15 +181,13 @@ var selectedList = selectedOption.value; $("#collectionSpotlight{$collectionSpotlight->id} .titleScroller.active").removeClass('active').hide(); - $("#" + selectedList).addClass('active').show().jcarousel('reload'); + $("#" + selectedList).addClass('active').show(); + $('#collectionSpotlightCarousel' + selectedOption.dataset.carouselid).jcarousel('reload'); {rdelim} $(document).ready(function(){ldelim} {if count($collectionSpotlight->lists) > 1 && (!isset($collectionSpotlight->listDisplayType) || $collectionSpotlight->listDisplayType == 'tabs')} - var tablists = document.querySelectorAll('[role=tablist]'); - for (var i = 0; i < tablists.length; i++) {ldelim} - new TabsSwitcher(tablists[i]); - {rdelim} + applyTabsSwitcher(); $('#collectionSpotlight{$collectionSpotlight->id} a[data-toggle="tab"]').on('shown.bs.tab', function (e) {ldelim} $('#collectionSpotlightCarousel' + $(e.target).data('carouselid')).jcarousel('reload'); {rdelim}); @@ -191,6 +195,14 @@ {rdelim}); {/if} + {strip} {/strip} \ No newline at end of file diff --git a/code/web/interface/themes/responsive/CollectionSpotlight/horizontalCarousel.tpl b/code/web/interface/themes/responsive/CollectionSpotlight/horizontalCarousel.tpl index 594c6efbf6..57a0ece4d2 100644 --- a/code/web/interface/themes/responsive/CollectionSpotlight/horizontalCarousel.tpl +++ b/code/web/interface/themes/responsive/CollectionSpotlight/horizontalCarousel.tpl @@ -1,4 +1,4 @@ -