From: Andreas Unterkircher Date: Sun, 20 Jan 2008 07:49:36 +0000 (+0100) Subject: issue104, when autobrowse is active, ensure pause icon is getting displayed X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bab49d7bcc40cf1ca56b2ef93484a8a64f19f6c;p=phpfspot.git issue104, when autobrowse is active, ensure pause icon is getting displayed Signed-off-by: Andreas Unterkircher --- diff --git a/phpfspot.js b/phpfspot.js index d8290ad..c4b39b5 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -226,7 +226,7 @@ function init_phpfspot(mode) } if(whattodo == 'show_photo') { if(photo = getPhotoToShow()) { - showImage(photo) + showImage(photo); refreshSelectedTags(); } } @@ -469,7 +469,8 @@ function startAutoBrowse() document.getElementById('autobrowse_ico').src = "resources/32_play.png"; } -} +} // startAutoBrowser() + function autoBrowse() { if(document.getElementById('next_link')) { @@ -477,7 +478,14 @@ function autoBrowse() window.location.href = next_link; document.getElementById('autobrowse_ico').src = "resources/32_pause.png"; } -} + /* we have reached the last photo */ + else { + if(document.getElementById('autobrowse_ico')) + document.getElementById('autobrowse_ico').src = "resources/32_play.png"; + clearInterval(autobrowse); + } + +} // autoBrowse() function initSlider() { diff --git a/themes/default/templates/single_photo.tpl b/themes/default/templates/single_photo.tpl index b9693c6..fb194a8 100644 --- a/themes/default/templates/single_photo.tpl +++ b/themes/default/templates/single_photo.tpl @@ -99,4 +99,10 @@ { /if} +