diff options
author | friendica <info@friendica.com> | 2012-07-19 03:59:32 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-19 03:59:32 -0700 |
commit | 6402fa11703b094426ed99f53f04ad8e9fbbbf90 (patch) | |
tree | caa21005805845e356d575b8fec026c1a7dfc513 /view/main_slider.tpl | |
parent | 3b1c2ce0012eab78482e9695bb7f1ca60feca050 (diff) | |
download | volse-hubzilla-6402fa11703b094426ed99f53f04ad8e9fbbbf90.tar.gz volse-hubzilla-6402fa11703b094426ed99f53f04ad8e9fbbbf90.tar.bz2 volse-hubzilla-6402fa11703b094426ed99f53f04ad8e9fbbbf90.zip |
dynamic load on slider change + delay to settle
Diffstat (limited to 'view/main_slider.tpl')
-rw-r--r-- | view/main_slider.tpl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/view/main_slider.tpl b/view/main_slider.tpl index bc9a60ed1..19d6fb15a 100644 --- a/view/main_slider.tpl +++ b/view/main_slider.tpl @@ -1,14 +1,20 @@ -<div id="main-slider" class="slider" style="height: 32px; position: relative; left: 5%; width: 80%;"><input id="main-range" type="text" name="cminmax" value="$val" /></div> -<input id="slider-refresh" type="submit" name="submit" value="$refresh" onclick="networkRefresh();" /><div class="clear"></div> +<div id="main-slider" class="slider" ><input id="main-range" type="text" name="cminmax" value="$val" /></div> <script> $("#main-range").slider({ from: 0, to: 99, step: 1, scale: ['$me', '$intimate', '|', '$friends', '|', '$coworkers', '|', '$oldfriends', '|', '$acquaintances', '|', '$world' ], onstatechange: function(v) { var carr = v.split(";"); network_cmin = carr[0]; network_cmax = carr[1]; + networkRefresh(); } }); + var slideTimer = null; function networkRefresh() { - window.location.href = buildCmd(); + if((document.readyState !== "complete") || (slideTimer !== null)) + return; + slideTimer = setTimeout(networkTimerRefresh,5000); } + function networkTimerRefresh() { + window.location.href = buildCmd(); + } </script> |