diff options
-rw-r--r-- | js/main.js | 14 | ||||
-rw-r--r-- | mod/network.php | 32 | ||||
-rw-r--r-- | view/main_slider.tpl | 6 | ||||
-rw-r--r-- | view/search_item.tpl | 2 | ||||
-rw-r--r-- | view/wall_item.tpl | 4 | ||||
-rw-r--r-- | view/wallwall_item.tpl | 2 |
6 files changed, 35 insertions, 25 deletions
diff --git a/js/main.js b/js/main.js index 1feb7446e..1454dd0b5 100644 --- a/js/main.js +++ b/js/main.js @@ -327,13 +327,19 @@ function updateConvItems(mode,data) { in_progress = true; - var udargs = ((page_load) ? '/load' : ''); - page_load = false; + var update_url; - var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); + if(typeof buildCmd == 'function') { + update_url = buildCmd(); + } + else { + var udargs = ((page_load) ? '/load' : ''); + update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); + } $.get(update_url,function(data) { - var update_mode = ((page_load) ? 'replace' : 'update'); + var update_mode = ((page_load) ? 'replace' : 'update'); + page_load = false; in_progress = false; updateConvItems(update_mode,data); }); diff --git a/mod/network.php b/mod/network.php index 7e1bfdcda..2f93dd3bc 100644 --- a/mod/network.php +++ b/mod/network.php @@ -488,7 +488,7 @@ function network_content(&$a, $update = 0, $load = false) { $a->page['htmlhead'] .= "<script>\r\n" - . "var network_cmd = " . '"' . $a->get_baseurl() . '/network/' . '"' . ";\r\n" + . "var network_cmd = " . '"' . $a->get_baseurl() . '/update_network' . '"' . ";\r\n" . "var network_uid = " . ((local_user()) ? local_user() : 0) . ";\r\n" . "var network_gid = " . (($gid) ? $gid : 0) . ";\r\n" . "var network_cid = " . (($_GET['cid']) ? $_GET['cid'] : 0) . ";\r\n" @@ -508,21 +508,23 @@ function network_content(&$a, $update = 0, $load = false) { . 'var network_dend = "' . $datequery . '"' . ";\r\n" . 'var network_dbegin = "' . $datequery2 . '"' . ";\r\n" - . 'function buildCmd() { var bCmd = network_cmd + "?f=" ; + . 'function buildCmd() { + var udargs = ((page_load) ? "/load" : ""); + var bCmd = network_cmd + udargs + "?f=" ; if(network_uid) bCmd = bCmd + "&p=" + network_uid; - if(network_cmin) bCmd = bCmd + "&cmin=" + network_cmin; - if(network_cmax) bCmd = bCmd + "&cmax=" + network_cmax; - if(network_gid) { bCmd = bCmd + "&gid=" + network_gid; } else - if(network_cid) { bCmd = bCmd + "&cid=" + network_cid; } - if(network_star) bCmd = bCmd + "&star=" + network_star; - if(network_liked) bCmd = bCmd + "&liked=" + network_liked; - if(network_conv) bCmd = bCmd + "&conv=" + network_conv; - if(network_spam) bCmd = bCmd + "&spam=" + network_spam; - if(network_new) bCmd = bCmd + "&new=" + network_new; - if(network_search) bCmd = bCmd + "&search=" + network_search; - if(network_file) bCmd = bCmd + "&file=" + network_file; - if(network_dend) bCmd = bCmd + "&dend=" + network_dend; - if(network_dbegin) bCmd = bCmd + "&dbegin=" + network_dbegin; + if(network_cmin != 0) bCmd = bCmd + "&cmin=" + network_cmin; + if(network_cmax != 99) bCmd = bCmd + "&cmax=" + network_cmax; + if(network_gid != 0) { bCmd = bCmd + "&gid=" + network_gid; } else + if(network_cid != 0) { bCmd = bCmd + "&cid=" + network_cid; } + if(network_star != 0) bCmd = bCmd + "&star=" + network_star; + if(network_liked != 0) bCmd = bCmd + "&liked=" + network_liked; + if(network_conv!= 0) bCmd = bCmd + "&conv=" + network_conv; + if(network_spam != 0) bCmd = bCmd + "&spam=" + network_spam; + if(network_new != 0) bCmd = bCmd + "&new=" + network_new; + if(network_search != "") bCmd = bCmd + "&search=" + network_search; + if(network_file != "") bCmd = bCmd + "&file=" + network_file; + if(network_dend != "") bCmd = bCmd + "&dend=" + network_dend; + if(network_dbegin != "") bCmd = bCmd + "&dbegin=" + network_dbegin; if(network_page != 1) bCmd = bCmd + "&page=" + network_page; return(bCmd); diff --git a/view/main_slider.tpl b/view/main_slider.tpl index 19d6fb15a..6f2b5f4a3 100644 --- a/view/main_slider.tpl +++ b/view/main_slider.tpl @@ -11,10 +11,12 @@ function networkRefresh() { if((document.readyState !== "complete") || (slideTimer !== null)) return; - slideTimer = setTimeout(networkTimerRefresh,5000); + slideTimer = setTimeout(networkTimerRefresh,2000); } function networkTimerRefresh() { - window.location.href = buildCmd(); + slideTimer = null; + page_load = true; + liveUpdate(); } </script> diff --git a/view/search_item.tpl b/view/search_item.tpl index e13c1e5a7..dc4a43c6a 100644 --- a/view/search_item.tpl +++ b/view/search_item.tpl @@ -42,7 +42,7 @@ <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" > {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }} </div> - {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} + {{ if $item.drop.pagedropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} <div class="wall-item-delete-end"></div> </div> </div> diff --git a/view/wall_item.tpl b/view/wall_item.tpl index b9278b375..458677433 100644 --- a/view/wall_item.tpl +++ b/view/wall_item.tpl @@ -62,9 +62,9 @@ <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"></a> {{ endif }} <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" > - {{ if $item.drop.pagedropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }} + {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }} </div> - {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} + {{ if $item.drop.pagedropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} <div class="wall-item-delete-end"></div> </div> </div> diff --git a/view/wallwall_item.tpl b/view/wallwall_item.tpl index 478df8e88..983c03287 100644 --- a/view/wallwall_item.tpl +++ b/view/wallwall_item.tpl @@ -69,7 +69,7 @@ <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" > {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }} </div> - {{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} + {{ if $item.drop.pagedropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }} <div class="wall-item-delete-end"></div> </div> </div> |