Support for photo view count, including redirects.
This commit is contained in:
parent
77c42a1e5d
commit
067b76462e
14
js/pear.js
14
js/pear.js
@ -148,7 +148,7 @@ function swatchImg(imageId)
|
||||
if( detailViewMode )
|
||||
{
|
||||
//Image count.
|
||||
$.get(slideshowImages[currentImg][1]);
|
||||
$.get(slideshowImages[currentImg][6]);
|
||||
}
|
||||
updateHash();
|
||||
$('#info_detail').attr('href', slideshowImages[currentImg][1]);
|
||||
@ -220,11 +220,11 @@ function bodyLoad(viewMode, bgcolor) {
|
||||
hash = window.location.hash;
|
||||
var h = $.parseQuery(hash.substring(1));
|
||||
if(h.img != undefined)
|
||||
currentImg = h.img;
|
||||
currentImg = parseInt(h.img);
|
||||
if(h.bgcolor != undefined)
|
||||
swatchSkin(h.bgcolor);
|
||||
if(h.viewMode == 'detail')
|
||||
focusImage(currentImg);
|
||||
focusImage(currentImg, h.redirected);
|
||||
else
|
||||
viewMode = h.viewMode;
|
||||
/* end parse hash */
|
||||
@ -342,7 +342,7 @@ function togglePlayPause()
|
||||
slideShow=null;
|
||||
}
|
||||
}
|
||||
function focusImage(id)
|
||||
function focusImage(id, redirected)
|
||||
{
|
||||
currentImg=id;
|
||||
$('#imageTitleLabel').html("<h2>"+slideshowImages[id][4]+"</h2>");
|
||||
@ -351,10 +351,12 @@ function focusImage(id)
|
||||
swatchImg(id);
|
||||
$('#detailView').fadeIn('slow');
|
||||
hideHoverV = setTimeout("hideHoverView()",3000);
|
||||
//Image count.
|
||||
detailViewMode=true;
|
||||
updateHash();
|
||||
$.get(slideshowImages[currentImg][1]);
|
||||
//Image count.
|
||||
if(!redirected)
|
||||
$.get(slideshowImages[currentImg][6]);
|
||||
$('#info_detail').attr('href', slideshowImages[currentImg][1]);
|
||||
}
|
||||
var pearCarousel;
|
||||
function startImageFlow()
|
||||
|
@ -1,6 +1,6 @@
|
||||
name = ".Pear Theme"
|
||||
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>"
|
||||
site = 1
|
||||
admin = 0
|
||||
|
@ -69,7 +69,7 @@ endif;
|
||||
var slideshowImages = new Array();
|
||||
<? foreach ($children as $i => $child): ?>
|
||||
<? if(!($child->is_album() || $child->is_movie())): ?>
|
||||
slideshowImages.push(['<?= $child->resize_url() ?>', '<?= url::site("exif/show/$child->id") ?>', '<?= $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 ?>
|
||||
<? endforeach ?>
|
||||
</script>
|
||||
@ -87,4 +87,4 @@ endif;
|
||||
<?= $theme->album_bottom() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
<div id="pearImageFlow" class="imageflow"> </div>
|
||||
<div id="pearImageFlow" class="imageflow" style="display: none;"> </div>
|
||||
|
@ -4,7 +4,7 @@
|
||||
if(!($child->is_album() || $child->is_movie()))
|
||||
if($child->url() == $_SERVER['REQUEST_URI']):?>
|
||||
<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>
|
||||
<? die(0) ?>
|
||||
<? endif ?>
|
||||
|
Reference in New Issue
Block a user