diff options
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> |