Fix for carousel view via settings (and iron out some other bugs).
This commit is contained in:
parent
ab1cd0a7a7
commit
4b07153f2e
@ -87,7 +87,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
->checked(module::get_var("th_pear4gallery3", "hide_logo"));
|
->checked(module::get_var("th_pear4gallery3", "hide_logo"));
|
||||||
$group->dropdown("mainmenu_view")
|
$group->dropdown("mainmenu_view")
|
||||||
->label(t("Main page 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"));
|
->selected(module::get_var("th_pear4gallery3", "mainmenu_view"));
|
||||||
$group->checkbox("show_guest_menu")
|
$group->checkbox("show_guest_menu")
|
||||||
->label(t("Show Main Menu for Guest Users"))
|
->label(t("Show Main Menu for Guest Users"))
|
||||||
|
15
js/pear.js
15
js/pear.js
@ -186,7 +186,6 @@ function mosaicResize()
|
|||||||
myWidth = document.body.clientWidth;
|
myWidth = document.body.clientWidth;
|
||||||
myHeight = document.body.clientHeight;
|
myHeight = document.body.clientHeight;
|
||||||
}
|
}
|
||||||
$('#pearFlowPadd').css({'height' : myHeight-87-(Math.round(myWidth / 2.4))+'px'});
|
|
||||||
if($('#imageflow').length != 0)
|
if($('#imageflow').length != 0)
|
||||||
$('#imageflow').css({'height': (myHeight-53)+'px', 'width': (((myWidth*0.5)<(myHeight-53)) ? myWidth : ((myHeight-65)*2)) +'px'});
|
$('#imageflow').css({'height': (myHeight-53)+'px', 'width': (((myWidth*0.5)<(myHeight-53)) ? myWidth : ((myHeight-65)*2)) +'px'});
|
||||||
$('#detailImageView').css({'height': myHeight-165+"px"});
|
$('#detailImageView').css({'height': myHeight-165+"px"});
|
||||||
@ -195,8 +194,9 @@ function mosaicResize()
|
|||||||
$('#img_detail').css({'height': iHeight+"px", 'width':iWidth+"px"});
|
$('#img_detail').css({'height': iHeight+"px", 'width':iWidth+"px"});
|
||||||
|
|
||||||
myWidth=myWidth-7;
|
myWidth=myWidth-7;
|
||||||
($('#paginator').length != 0) ? myHeight-=165: myHeight-=138;
|
|
||||||
myHeight = myHeight - $('#g-site-status').outerHeight(true);
|
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);
|
$('#g-header').css('top', $('#gsNavBar').outerHeight(true)+$('#g-site-status').outerHeight(true)-4);
|
||||||
|
|
||||||
if($('#g-movie').length)
|
if($('#g-movie').length)
|
||||||
@ -226,9 +226,7 @@ function bodyLoad(viewMode, bgcolor) {
|
|||||||
currentImg = parseInt(h.img);
|
currentImg = parseInt(h.img);
|
||||||
if(h.bgcolor != undefined)
|
if(h.bgcolor != undefined)
|
||||||
swatchSkin(h.bgcolor);
|
swatchSkin(h.bgcolor);
|
||||||
if(h.viewMode == 'detail')
|
if(h.viewMode != undefined)
|
||||||
focusImage(currentImg, h.redirected);
|
|
||||||
else
|
|
||||||
viewMode = h.viewMode;
|
viewMode = h.viewMode;
|
||||||
/* end parse hash */
|
/* end parse hash */
|
||||||
|
|
||||||
@ -260,8 +258,6 @@ if(typeof slideshowImages != 'undefined')
|
|||||||
|
|
||||||
switch (viewMode) {
|
switch (viewMode) {
|
||||||
case 'carousel':
|
case 'carousel':
|
||||||
startImageFlow();
|
|
||||||
switchToMosaic();
|
|
||||||
startImageFlow();
|
startImageFlow();
|
||||||
break;
|
break;
|
||||||
case 'grid':
|
case 'grid':
|
||||||
@ -270,6 +266,9 @@ if(typeof slideshowImages != 'undefined')
|
|||||||
case 'mosaic':
|
case 'mosaic':
|
||||||
switchToMosaic();
|
switchToMosaic();
|
||||||
break;
|
break;
|
||||||
|
case 'detail':
|
||||||
|
focusImage(currentImg, h.redirected);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
mosaicResize();
|
mosaicResize();
|
||||||
checkCookie();
|
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});
|
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');
|
switchMode('carousel');
|
||||||
|
mosaicResize();
|
||||||
}
|
}
|
||||||
function setKeys()
|
function setKeys()
|
||||||
{
|
{
|
||||||
|
@ -96,5 +96,5 @@ endif;
|
|||||||
<?= $theme->album_bottom() ?>
|
<?= $theme->album_bottom() ?>
|
||||||
|
|
||||||
<?= $theme->paginator() ?>
|
<?= $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>
|
<div id="pearImageFlow" class="imageflow" style="display: none;"> </div>
|
||||||
|
Reference in New Issue
Block a user