issue104, when autobrowse is active, ensure pause icon is getting displayed
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 20 Jan 2008 07:49:36 +0000 (08:49 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 20 Jan 2008 07:49:36 +0000 (08:49 +0100)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.js
themes/default/templates/single_photo.tpl

index d8290ad7d1047f09b9dd1e18a43765fb3a36a4af..c4b39b55a5cac2ff95228b927856dd6f3cd589b1 100644 (file)
@@ -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()
 {
index b9693c65c9b8ca5e36527676717d69d1b35c5b32..fb194a84bfcb675c3da10027569ee588afd9943a 100644 (file)
   { /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 -->