diff options
-rw-r--r-- | phpfspot.js | 14 | ||||
-rw-r--r-- | themes/default/templates/single_photo.tpl | 6 |
2 files changed, 17 insertions, 3 deletions
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} </div> </div> +<script type="text/javascript"> +<!-- + if(autobrowse && document.getElementById("autobrowse_ico")) + document.getElementById("autobrowse_ico").src = 'resources/32_pause.png'; +--> +</script> <!-- /Single photo --> |