fix so only Grid mode is supported if album does not contain any images
This commit is contained in:
parent
92c70a108c
commit
41a9863e16
@ -350,14 +350,13 @@ font-weight: bold;
|
|||||||
.vs-icon-slideshow { background-position: -60px 0px; }
|
.vs-icon-slideshow { background-position: -60px 0px; }
|
||||||
.hover-with-viewSwitcher .vs-icon-slideshow, .sel-with-viewSwitcher .vs-icon-slideshow { background-position: -60px -15px; }
|
.hover-with-viewSwitcher .vs-icon-slideshow, .sel-with-viewSwitcher .vs-icon-slideshow { background-position: -60px -15px; }
|
||||||
|
|
||||||
#viewControls .viewSwitcher:hover, #viewControls .sel-with-viewSwitcher, #viewControls .hover-with-viewSwitcher {
|
#viewControls .sel-with-viewSwitcher, #viewControls .hover-with-viewSwitcher {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
#viewControls .sel-with-viewSwitcher {
|
#viewControls .sel-with-viewSwitcher, #viewControls .disabled {
|
||||||
cursor: default;
|
cursor: default !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************ DETAIL VIEW **************************/
|
/************************ DETAIL VIEW **************************/
|
||||||
|
|
||||||
#detailView {
|
#detailView {
|
||||||
|
16
js/pear.js
16
js/pear.js
@ -463,7 +463,6 @@ function bodyLoad(vm, bgcolor) {
|
|||||||
if (!$('#mosaicGridContainer').length) { $('#loading').hide(); maxSize = 0; return; }
|
if (!$('#mosaicGridContainer').length) { $('#loading').hide(); maxSize = 0; return; }
|
||||||
//Set event for Thumb Click.
|
//Set event for Thumb Click.
|
||||||
$('.p-photo').each(function (index) { $(this).click(function () { if (mosaicView) { swatchImg(index); } else {focusImage(index); } }); });
|
$('.p-photo').each(function (index) { $(this).click(function () { if (mosaicView) { swatchImg(index); } else {focusImage(index); } }); });
|
||||||
$('#slideshow').click(function () { startSlideshow(); });
|
|
||||||
$('#mosaicDetail').click(function () { focusImage(currentImg); });
|
$('#mosaicDetail').click(function () { focusImage(currentImg); });
|
||||||
$('#prev_detail').click(function () { swatchImg(currentImg - 1); });
|
$('#prev_detail').click(function () { swatchImg(currentImg - 1); });
|
||||||
$('#next_detail').click(function () { swatchImg(currentImg + 1); });
|
$('#next_detail').click(function () { swatchImg(currentImg + 1); });
|
||||||
@ -540,14 +539,15 @@ function bodyLoad(vm, bgcolor) {
|
|||||||
$("#g-place-holder").remove();
|
$("#g-place-holder").remove();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$(".viewSwitcher").hover(
|
if (slideshowImages.length !== 0) {
|
||||||
function() {
|
$(".viewSwitcher").hover( function() { $(this).addClass("hover-with-viewSwitcher"); }, function() { $(this).removeClass("hover-with-viewSwitcher"); });
|
||||||
$(this).addClass("hover-with-viewSwitcher");
|
$("#grid").click(function () { switchToGrid(true); });
|
||||||
},
|
$("#mosaic").click(function () { switchToMosaic(true); });
|
||||||
function() {
|
$("#carousel").click(function () { startImageFlow(true); });
|
||||||
$(this).removeClass("hover-with-viewSwitcher");
|
$('#slideshow').click(function () { startSlideshow(); });
|
||||||
|
} else {
|
||||||
|
$("#grid, #mosaic, #carousel, #slideshow").addClass("disabled");
|
||||||
}
|
}
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function preFetch() {
|
function preFetch() {
|
||||||
|
@ -169,19 +169,16 @@
|
|||||||
|
|
||||||
<div class="" style="" id="viewControls">
|
<div class="" style="" id="viewControls">
|
||||||
<? if ($theme->page_subtype != "movie"): ?>
|
<? if ($theme->page_subtype != "movie"): ?>
|
||||||
<div title="Display this album in a grid view" id="grid" class="grid viewSwitcher sel sel-with-viewSwitcher viewSwitcher-icon" onclick="switchToGrid(true);">
|
<div title="Display this album in a grid view" id="grid" class="grid viewSwitcher sel sel-with-viewSwitcher viewSwitcher-icon">
|
||||||
<span class="vs-icon vs-icon-grid"></span>Grid
|
<span class="vs-icon vs-icon-grid"></span>Grid
|
||||||
</div>
|
</div>
|
||||||
<div title="Display this album in a mosaic view" id="mosaic" class="viewSwitcher mosaic" onclick="switchToMosaic(true);">
|
<div title="Display this album in a mosaic view" id="mosaic" class="viewSwitcher mosaic">
|
||||||
<!-- <div style="margin-top:-2px;margin-left:-4px;"> -->
|
|
||||||
<span class="vs-icon vs-icon-mosaic"></span>Mosaic
|
<span class="vs-icon vs-icon-mosaic"></span>Mosaic
|
||||||
</div>
|
</div>
|
||||||
<div title="Display this album in a carousel view" id="carousel" class="carousel viewSwitcher" onclick="startImageFlow(true);">
|
<div title="Display this album in a carousel view" id="carousel" class="carousel viewSwitcher">
|
||||||
<!-- <div style="margin-top:-2px;"> -->
|
|
||||||
<span class="vs-icon vs-icon-carousel"></span>Carousel
|
<span class="vs-icon vs-icon-carousel"></span>Carousel
|
||||||
</div>
|
</div>
|
||||||
<div title="Play a slideshow of this album" id="slideshow" class="viewSwitcher slideshow slideshow-with-viewSwitcher">
|
<div title="Play a slideshow of this album" id="slideshow" class="viewSwitcher slideshow slideshow-with-viewSwitcher">
|
||||||
<!-- <div style="margin-top:-2px;margin-left:-2px;"> -->
|
|
||||||
<span class="vs-icon vs-icon-slideshow"></span>Slideshow
|
<span class="vs-icon vs-icon-slideshow"></span>Slideshow
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
Reference in New Issue
Block a user