summaryrefslogtreecommitdiffstats
path: root/phpfspot.js
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot.js')
-rw-r--r--phpfspot.js28
1 files changed, 26 insertions, 2 deletions
diff --git a/phpfspot.js b/phpfspot.js
index 1e074bb..88af0b5 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -305,7 +305,7 @@ function startSlideShow()
if(!sliding) {
HTML_AJAX.grab(encodeURI('rpc.php?action=reset_slideshow'));
nextSlide();
- sliding = setInterval("nextSlide()", 3000);
+ sliding = setInterval("nextSlide()", sliding_time*1000);
document.getElementById('stop_ico').src = "resources/32_stop.png";
}
else {
@@ -336,7 +336,7 @@ function pauseSlideShow()
}
else {
sliding_paused = 0;
- sliding = setInterval("nextSlide()", 3000);
+ sliding = setInterval("nextSlide()", sliding_time*1000);
document.getElementById('pause_ico').src = "resources/32_pause.png";
}
}
@@ -363,9 +363,33 @@ function autoBrowse()
}
}
+function initSlider()
+{
+ var sliderEl = document.getElementById ? document.getElementById("slider-1") : null;
+ var inputEl = document.forms[0]["slider-input-1"];
+ var s = new Slider(sliderEl, inputEl);
+ s.setMinimum(1);
+ s.setMaximum(10);
+ s.setValue(sliding_time);
+ document.getElementById("current_slide_time").innerHTML = sliding_time + "s Interval";
+ s.onchange = function () {
+ sliding_time = s.getValue();
+ document.getElementById("current_slide_time").innerHTML = sliding_time + "s Interval";
+ if(!sliding_paused && sliding) {
+ clearInterval(sliding);
+ sliding = setInterval("nextSlide()", sliding_time*1000);
+ }
+ };
+ window.onresize = function () {
+ s.recalculate();
+ };
+
+}
+
var startup = 1;
var calendar_shown = 0;
var calendar_mode = '';
var autobrowse = 0;
var sliding = 0;
var sliding_paused = 0;
+var sliding_time = 3;