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; }
|
||||
.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;
|
||||
}
|
||||
#viewControls .sel-with-viewSwitcher {
|
||||
cursor: default;
|
||||
#viewControls .sel-with-viewSwitcher, #viewControls .disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
|
||||
/************************ DETAIL VIEW **************************/
|
||||
|
||||
#detailView {
|
||||
|
18
js/pear.js
18
js/pear.js
@ -463,7 +463,6 @@ function bodyLoad(vm, bgcolor) {
|
||||
if (!$('#mosaicGridContainer').length) { $('#loading').hide(); maxSize = 0; return; }
|
||||
//Set event for Thumb Click.
|
||||
$('.p-photo').each(function (index) { $(this).click(function () { if (mosaicView) { swatchImg(index); } else {focusImage(index); } }); });
|
||||
$('#slideshow').click(function () { startSlideshow(); });
|
||||
$('#mosaicDetail').click(function () { focusImage(currentImg); });
|
||||
$('#prev_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();
|
||||
}
|
||||
);
|
||||
$(".viewSwitcher").hover(
|
||||
function() {
|
||||
$(this).addClass("hover-with-viewSwitcher");
|
||||
},
|
||||
function() {
|
||||
$(this).removeClass("hover-with-viewSwitcher");
|
||||
}
|
||||
);
|
||||
if (slideshowImages.length !== 0) {
|
||||
$(".viewSwitcher").hover( function() { $(this).addClass("hover-with-viewSwitcher"); }, function() { $(this).removeClass("hover-with-viewSwitcher"); });
|
||||
$("#grid").click(function () { switchToGrid(true); });
|
||||
$("#mosaic").click(function () { switchToMosaic(true); });
|
||||
$("#carousel").click(function () { startImageFlow(true); });
|
||||
$('#slideshow').click(function () { startSlideshow(); });
|
||||
} else {
|
||||
$("#grid, #mosaic, #carousel, #slideshow").addClass("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
function preFetch() {
|
||||
|
@ -169,19 +169,16 @@
|
||||
|
||||
<div class="" style="" id="viewControls">
|
||||
<? 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
|
||||
</div>
|
||||
<div title="Display this album in a mosaic view" id="mosaic" class="viewSwitcher mosaic" onclick="switchToMosaic(true);">
|
||||
<!-- <div style="margin-top:-2px;margin-left:-4px;"> -->
|
||||
<div title="Display this album in a mosaic view" id="mosaic" class="viewSwitcher mosaic">
|
||||
<span class="vs-icon vs-icon-mosaic"></span>Mosaic
|
||||
</div>
|
||||
<div title="Display this album in a carousel view" id="carousel" class="carousel viewSwitcher" onclick="startImageFlow(true);">
|
||||
<!-- <div style="margin-top:-2px;"> -->
|
||||
<div title="Display this album in a carousel view" id="carousel" class="carousel viewSwitcher">
|
||||
<span class="vs-icon vs-icon-carousel"></span>Carousel
|
||||
</div>
|
||||
<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
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
Reference in New Issue
Block a user