issue104, when autobrowse is active, ensure pause icon is getting displayed
[phpfspot.git] / phpfspot.js
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()
 {