1
0

Merge commit '293feae938ce5366698ca2e7ce5a27398bd823fa'

This commit is contained in:
Fredrik Erlandsson 2011-06-17 11:19:38 +02:00
commit 0944a423e7
6 changed files with 26 additions and 19 deletions

View File

@ -57,7 +57,7 @@ height:40px;
#logoButton { #logoButton {
display: block; display: block;
z-index: 1000; z-index: 100;
background: transparent url('pear_logo_sml.png') no-repeat center left; background: transparent url('pear_logo_sml.png') no-repeat center left;
width: 83px; width: 83px;
height: 40px; height: 40px;
@ -84,7 +84,7 @@ background: transparent url('pear_logo_sml.png') no-repeat center left;
padding: 0px 0px; padding: 0px 0px;
width: auto; width: auto;
float: right; float: right;
z-index: 10000; z-index: 100;
font-size: 12px; font-size: 12px;
top: 11px; top: 11px;
} }
@ -203,7 +203,7 @@ top: 10px;
height: 3px; height: 3px;
width: 154px; width: 154px;
float: right; float: right;
z-index: 10000; z-index: 100;
} }
.sliderView .smaller { .sliderView .smaller {
@ -305,7 +305,7 @@ width: 381px;
float: left; float: left;
margin-left: 30px; margin-left: 30px;
margin-top: 13px; margin-top: 13px;
z-index: 8000; z-index: 800;
font-size: 12px; font-size: 12px;
text-shadow: #111111 0px -1px 1px; text-shadow: #111111 0px -1px 1px;
} }
@ -400,8 +400,9 @@ background: url('slideshow_active.png') center left no-repeat;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 99999; z-index: 999;
background-color: #000000; background-color: #000000;
display: none;
} }
#detailView .iMovieVideo { #detailView .iMovieVideo {
@ -535,7 +536,7 @@ background: url('slideshow_active.png') center left no-repeat;
bottom: 30px; bottom: 30px;
width: 99%; width: 99%;
text-align: center; text-align: center;
z-index: 99999; z-index: 999;
} }
#hoverView #hoverViewMenu { #hoverView #hoverViewMenu {

View File

@ -148,9 +148,10 @@ function swatchImg(imageId)
if( detailViewMode ) if( detailViewMode )
{ {
//Image count. //Image count.
$.get(slideshowImages[currentImg][1]); $.get(slideshowImages[currentImg][6]);
} }
updateHash(); updateHash();
$('#info_detail').attr('href', slideshowImages[currentImg][1]);
} }
function updateHash() function updateHash()
@ -196,6 +197,8 @@ function mosaicResize()
myWidth=myWidth-7; myWidth=myWidth-7;
($('#paginator').length != 0) ? myHeight-=165: myHeight-=138; ($('#paginator').length != 0) ? myHeight-=165: myHeight-=138;
myHeight = myHeight - $('#g-site-status').outerHeight(true);
$('#g-header').css('top', $('#gsNavBar').outerHeight(true)+$('#g-site-status').outerHeight(true)-4);
if ( !mosaicView ) if ( !mosaicView )
{ {
@ -219,11 +222,11 @@ function bodyLoad(viewMode, bgcolor) {
hash = window.location.hash; hash = window.location.hash;
var h = $.parseQuery(hash.substring(1)); var h = $.parseQuery(hash.substring(1));
if(h.img != undefined) if(h.img != undefined)
currentImg = 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 == 'detail')
focusImage(currentImg); focusImage(currentImg, h.redirected);
else else
viewMode = h.viewMode; viewMode = h.viewMode;
/* end parse hash */ /* end parse hash */
@ -341,7 +344,7 @@ function togglePlayPause()
slideShow=null; slideShow=null;
} }
} }
function focusImage(id) function focusImage(id, redirected)
{ {
currentImg=id; currentImg=id;
$('#imageTitleLabel').html("<h2>"+slideshowImages[id][4]+"</h2>"); $('#imageTitleLabel').html("<h2>"+slideshowImages[id][4]+"</h2>");
@ -350,10 +353,12 @@ function focusImage(id)
swatchImg(id); swatchImg(id);
$('#detailView').fadeIn('slow'); $('#detailView').fadeIn('slow');
hideHoverV = setTimeout("hideHoverView()",3000); hideHoverV = setTimeout("hideHoverView()",3000);
//Image count.
detailViewMode=true; detailViewMode=true;
updateHash(); updateHash();
$.get(slideshowImages[currentImg][1]); //Image count.
if(!redirected)
$.get(slideshowImages[currentImg][6]);
$('#info_detail').attr('href', slideshowImages[currentImg][1]);
} }
var pearCarousel; var pearCarousel;
function startImageFlow() function startImageFlow()

View File

@ -1,6 +1,6 @@
name = ".Pear Theme" name = ".Pear Theme"
description = "A theme with the intention to mimic Apples mobile me gallery." description = "A theme with the intention to mimic Apples mobile me gallery."
version = 2.1 version = 2.2
author = "Fredrik Erlandsson <fredrik.e@gmail.com>" author = "Fredrik Erlandsson <fredrik.e@gmail.com>"
site = 1 site = 1
admin = 0 admin = 0

View File

@ -42,8 +42,9 @@ $(function() {
if($child->is_album()): if($child->is_album()):
$granchildren = $child->viewable()->children(); $granchildren = $child->viewable()->children();
$offset = 0; $offset = 0;
$step = round(200/count($granchildren)); $step = round(200/min(count($granchildren),50));
foreach ($granchildren as $i => $granchild):?> foreach ($granchildren as $i => $granchild):?>
<? if(++$i > 50) break; ?>
<? if ($granchild->has_thumb()): ?> <? if ($granchild->has_thumb()): ?>
<?= $granchild->thumb_img(array("style" => "display: none;")) ?> <?= $granchild->thumb_img(array("style" => "display: none;")) ?>
<div class="skimm_div" style="height: 200px; width: <?=$step?>px; left: <?=$offset?>px; top: 0px;" onmouseover="$('#thumb_<?=$child->id?>').attr('src', '<?=$granchild->thumb_url()?>');skimimg=<?=$i?>;" id="area_<?=$granchild->id?>"></div> <div class="skimm_div" style="height: 200px; width: <?=$step?>px; left: <?=$offset?>px; top: 0px;" onmouseover="$('#thumb_<?=$child->id?>').attr('src', '<?=$granchild->thumb_url()?>');skimimg=<?=$i?>;" id="area_<?=$granchild->id?>"></div>
@ -68,7 +69,7 @@ endif;
var slideshowImages = new Array(); var slideshowImages = new Array();
<? foreach ($children as $i => $child): ?> <? foreach ($children as $i => $child): ?>
<? if(!($child->is_album() || $child->is_movie())): ?> <? if(!($child->is_album() || $child->is_movie())): ?>
slideshowImages.push(['<?= $child->resize_url() ?>', '<?= $child->url() ?>', '<?= $child->width ?>','<?= $child->height ?>', '<?= $child->title ?>', '<?= $child->file_url() ?>']); slideshowImages.push(['<?= $child->resize_url() ?>', '<?= url::site("exif/show/$child->id") ?>', '<?= $child->width ?>','<?= $child->height ?>', '<?= $child->title ?>', '<?= $child->file_url() ?>', '<?= $child->url() ?>']);
<? endif ?> <? endif ?>
<? endforeach ?> <? endforeach ?>
</script> </script>
@ -86,4 +87,4 @@ endif;
<?= $theme->album_bottom() ?> <?= $theme->album_bottom() ?>
<?= $theme->paginator() ?> <?= $theme->paginator() ?>
<div id="pearImageFlow" class="imageflow"> </div> <div id="pearImageFlow" class="imageflow" style="display: none;"> </div>

View File

@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?> <?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="detailView" style="display: none; z-index:99997;" onmousemove="showHoverView();"> <div id="detailView" onmousemove="showHoverView();">
<div class="overlay"> </div> <div class="overlay"> </div>
<div class="content"> <div class="content">
<div class="imageContainer"> <div class="imageContainer">
@ -16,7 +16,7 @@
<div id="pause_detail" style="display: none;" title="Pause" class="pause_detail" onclick="togglePlayPause();"> </div> <div id="pause_detail" style="display: none;" title="Pause" class="pause_detail" onclick="togglePlayPause();"> </div>
<div id="play_detail" style="display: none;" title="Play" class="play_detail" onclick="togglePlayPause();"> </div> <div id="play_detail" style="display: none;" title="Play" class="play_detail" onclick="togglePlayPause();"> </div>
<div id="next_detail" title="(N)ext" class="next_detail"> </div> <div id="next_detail" title="(N)ext" class="next_detail"> </div>
<div id="info_detail" title="Show more information about this photo" class="info_detail" onclick="document.location=slideshowImages[currentImg][1]"> </div> <div id="info_detail" title="Show more information about this photo" class="info_detail g-dialog-link"> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@
if(!($child->is_album() || $child->is_movie())) if(!($child->is_album() || $child->is_movie()))
if($child->url() == $_SERVER['REQUEST_URI']):?> if($child->url() == $_SERVER['REQUEST_URI']):?>
<html><body> <html><body>
<script type="text/javascript">window.location = '<? echo end($parents)->url() . "#img=$i&viewMode=detail"?>';</script> <script type="text/javascript">window.location = '<? echo end($parents)->url() . "#img=$i&viewMode=detail&redirected=true"?>';</script>
</body></html> </body></html>
<? die(0) ?> <? die(0) ?>
<? endif ?> <? endif ?>