aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/network.php16
-rw-r--r--view/main_slider.tpl8
2 files changed, 20 insertions, 4 deletions
diff --git a/mod/network.php b/mod/network.php
index b1bef5d53..8c8d9140d 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -514,10 +514,12 @@ function network_content(&$a, $update = 0) {
. ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '')
. ((x($_GET,'file')) ? '&file=' . $_GET['file'] : '')
- . "'; var profile_page = " . $a->pager['page'] . ";";
+ . "'; var profile_page = " . $a->pager['page'] . ";</script>";
- $o .= "var network_gid = " . (($gid) ? $gid : 0) . ";\r\n"
+ $a->page['htmlhead'] .= "<script>\r\n"
+ . "var network_cmd = " . '"' . $a->get_baseurl() . '/network/' . '"' . ";\r\n"
+ . "var network_gid = " . (($gid) ? $gid : 0) . ";\r\n"
. "var network_cid = " . (($_GET['cid']) ? $_GET['cid'] : 0) . ";\r\n"
. "var network_cmin = " . (($_GET['cmin']) ? $_GET['cmin'] : 0) . ";\r\n"
. "var network_cmax = " . (($_GET['cmax']) ? $_GET['cmax'] : 99) . ";\r\n"
@@ -534,9 +536,17 @@ function network_content(&$a, $update = 0) {
. 'var network_file = "' . $_GET['file'] . '"' . ";\r\n"
. 'var network_date_end = "' . $datequery . '"' . ";\r\n"
. 'var network_date_start = "' . $datequery2 . '"' . ";\r\n"
+ . 'function buildCmd() { var bCmd = network_cmd + "?f=" ;
+ if(network_cmin) bCmd = bCmd + "&cmin=" + network_cmin;
+ if(network_cmax) bCmd = bCmd + "&cmax=" + network_cmax;
+
+ return(bCmd);
+ }'
+
+ . "</script>\r\n";
+
;
- $o .= "</script>\r\n";
diff --git a/view/main_slider.tpl b/view/main_slider.tpl
index a559eae22..8792fe1dc 100644
--- a/view/main_slider.tpl
+++ b/view/main_slider.tpl
@@ -1,4 +1,10 @@
<div id="slider" style="height: 32px; position: relative; left: 5%; width: 90%;"><input id="main-range" type="text" name="cminmax" value="0;99" /></div>
<script>
- $("#main-range").slider({ from: 0, to: 99, step: 1, scale: ['$me', '$intimate', '|', '$friends', '|', '$coworkers', '|', '$oldfriends', '|', '$acquaintances', '|', '$world' ] });
+ $("#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];
+ var newcmd = buildCmd();
+ var f;
+ } });
</script>