From: Andreas Unterkircher Date: Sun, 22 Jul 2007 07:02:58 +0000 (+0000) Subject: issue56, play and pause of autobrowsing is now possible X-Git-Tag: phpfspot-1.2~97 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=168f6243a42314347bf385c9f79ccf0fdd7729c2;p=phpfspot.git issue56, play and pause of autobrowsing is now possible git-svn-id: file:///var/lib/svn/phpfspot/trunk@238 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- 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 Binary files /dev/null and b/resources/32_pause.png differ diff --git a/resources/32_play.png b/resources/32_play.png new file mode 100644 index 0000000..00f094d Binary files /dev/null and b/resources/32_play.png 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} - + {if $extern_link } {/if}