From 5a118f1db16afd22cb3c066f07cc6333fa0f96b6 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 29 Mar 2008 11:39:53 +0100 Subject: issue112, enhanced preload functions for photo-index Signed-off-by: Andreas Unterkircher --- phpfspot.js | 29 +++++++++++++++++++---------- themes/default/templates/photo_index.tpl | 17 ++++++++++++++--- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/phpfspot.js b/phpfspot.js index 89eacba..f9f9703 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -427,23 +427,32 @@ function WSR_getElementsByClassName(oElm, strTagName, oClassNames){ } -function preloadPhotos(lbImg) { +function preloadPhotos(image_url) { - var d=document; - if(d.images) - if(!d.photos) - d.photos=new Array(); - - var i, j=d.photos.length; + var i; + var timeout = 1000; + var waiting = 100; + var counting; lbImg=WSR_getElementsByClassName(document,"img","thumb"); for(i=0;i - thumb_{$images[thumb]} +
{$img_name[thumb]}
@@ -101,9 +101,20 @@
- -- cgit v1.2.3-18-g5258 From 072aed3d53445a6b09edabf1551706de4c3f1cb1 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 29 Mar 2008 11:44:51 +0100 Subject: issue112, preload previous and next photo in single-photo view Signed-off-by: Andreas Unterkircher --- phpfspot.class.php | 1 + themes/default/templates/single_photo.tpl | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/phpfspot.class.php b/phpfspot.class.php index be752ee..3b4a62e 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -546,6 +546,7 @@ class PHPFSPOT { $this->tmpl->assign('next_img', $next_img); } $this->tmpl->assign('mini_width', $this->cfg->mini_width); + $this->tmpl->assign('photo_width', $this->cfg->photo_width); $this->tmpl->assign('photo_number', $i); $this->tmpl->assign('photo_count', count($all_photos)); diff --git a/themes/default/templates/single_photo.tpl b/themes/default/templates/single_photo.tpl index ea513d9..a16776e 100644 --- a/themes/default/templates/single_photo.tpl +++ b/themes/default/templates/single_photo.tpl @@ -103,6 +103,13 @@ -- cgit v1.2.3-18-g5258