summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.js15
-rw-r--r--resources/32_pause.pngbin0 -> 350 bytes
-rw-r--r--resources/32_play.pngbin0 -> 709 bytes
-rw-r--r--themes/default/templates/single_photo.tpl2
4 files changed, 15 insertions, 2 deletions
diff --git a/phpfspot.js b/phpfspot.js
index 588298a..6bc0d2c 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -313,12 +313,25 @@ function nextSlide()
document.getElementById('slide_img').src = next_img;
}
+function startAutoBrowse()
+{
+ if(!autobrowse) {
+ autoBrowse();
+ autobrowse = setInterval("autoBrowse()", 5000);
+ }
+ else {
+ clearInterval(autobrowse);
+ autobrowse = 0;
+ document.getElementById('autobrowse_ico').src = "resources/32_play.png";
+ }
+
+}
function autoBrowse()
{
if(document.getElementById('next_link')) {
var next_link = document.getElementById('next_link').href;
window.location.href = next_link;
- setTimeout("autoBrowse()", 5000);
+ document.getElementById('autobrowse_ico').src = "resources/32_pause.png";
}
}
diff --git a/resources/32_pause.png b/resources/32_pause.png
new file mode 100644
index 0000000..7abcb23
--- /dev/null
+++ b/resources/32_pause.png
Binary files differ
diff --git a/resources/32_play.png b/resources/32_play.png
new file mode 100644
index 0000000..00f094d
--- /dev/null
+++ b/resources/32_play.png
Binary files differ
diff --git a/themes/default/templates/single_photo.tpl b/themes/default/templates/single_photo.tpl
index bb8c917..0965b07 100644
--- a/themes/default/templates/single_photo.tpl
+++ b/themes/default/templates/single_photo.tpl
@@ -16,7 +16,7 @@
{/if}
</td>
<td class="index_header" style="text-align: right;">
- <a href="javascript:autoBrowse();"><img src="resources/slideshow.png" /></a>
+ <a href="javascript:startAutoBrowse();" title="auto browsing"><img id="autobrowse_ico" src="resources/32_play.png" /></a>
{if $extern_link }
<a href="{$extern_link}" title="Use this link to return to the current view"><img src="resources/link.png" /></a>
{/if}