1
0

Fix for carousel view via settings (and iron out some other bugs).

This commit is contained in:
Fredrik Erlandsson 2011-09-30 14:12:02 +02:00
parent ab1cd0a7a7
commit 4b07153f2e
3 changed files with 9 additions and 10 deletions

View File

@ -87,7 +87,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
->checked(module::get_var("th_pear4gallery3", "hide_logo"));
$group->dropdown("mainmenu_view")
->label(t("Main page View"))
->options(array("grid" => t("Grid (Default)"), "mosaic" => t("Mosaic")))
->options(array("grid" => t("Grid (Default)"), "mosaic" => t("Mosaic"), "carousel" => t("Carousel")))
->selected(module::get_var("th_pear4gallery3", "mainmenu_view"));
$group->checkbox("show_guest_menu")
->label(t("Show Main Menu for Guest Users"))

View File

@ -186,7 +186,6 @@ function mosaicResize()
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
$('#pearFlowPadd').css({'height' : myHeight-87-(Math.round(myWidth / 2.4))+'px'});
if($('#imageflow').length != 0)
$('#imageflow').css({'height': (myHeight-53)+'px', 'width': (((myWidth*0.5)<(myHeight-53)) ? myWidth : ((myHeight-65)*2)) +'px'});
$('#detailImageView').css({'height': myHeight-165+"px"});
@ -195,8 +194,9 @@ function mosaicResize()
$('#img_detail').css({'height': iHeight+"px", 'width':iWidth+"px"});
myWidth=myWidth-7;
($('#paginator').length != 0) ? myHeight-=165: myHeight-=138;
myHeight = myHeight - $('#g-site-status').outerHeight(true);
$('#pearFlowPadd').css({'height' : myHeight-90-(Math.round(myWidth / 2.4))+'px'});
($('#paginator').length != 0) ? myHeight-=165: myHeight-=138;
$('#g-header').css('top', $('#gsNavBar').outerHeight(true)+$('#g-site-status').outerHeight(true)-4);
if($('#g-movie').length)
@ -226,9 +226,7 @@ function bodyLoad(viewMode, bgcolor) {
currentImg = parseInt(h.img);
if(h.bgcolor != undefined)
swatchSkin(h.bgcolor);
if(h.viewMode == 'detail')
focusImage(currentImg, h.redirected);
else
if(h.viewMode != undefined)
viewMode = h.viewMode;
/* end parse hash */
@ -260,8 +258,6 @@ if(typeof slideshowImages != 'undefined')
switch (viewMode) {
case 'carousel':
startImageFlow();
switchToMosaic();
startImageFlow();
break;
case 'grid':
@ -270,6 +266,9 @@ if(typeof slideshowImages != 'undefined')
case 'mosaic':
switchToMosaic();
break;
case 'detail':
focusImage(currentImg, h.redirected);
break;
default:
mosaicResize();
checkCookie();
@ -386,7 +385,7 @@ function startImageFlow()
pearCarousel.init({ImageFlowID: 'pearImageFlow', aspectRatio: 2.4, imagesHeight: 0.6, opacity: true, reflections: false, startID: currentImg, onClick: function() {focusImage($(this).attr('longdesc'));}, startAnimation: true, xStep: 200, imageFocusM: 1.7, imageFocusMax: 4, opacityArray: [10, 9, 6, 2], percentOther: 130, captions: false, slider: false});
}
switchMode('carousel');
mosaicResize();
}
function setKeys()
{

View File

@ -96,5 +96,5 @@ endif;
<?= $theme->album_bottom() ?>
<?= $theme->paginator() ?>
<div id="pearFlowPadd" class="imageflow"></div>
<div id="pearFlowPadd" class="imageflow" style="display: none;"></div>
<div id="pearImageFlow" class="imageflow" style="display: none;"> </div>