1
0
Fork 0

Auto update of network page only at top of the page

This commit is contained in:
Michael Vogel 2014-08-01 19:59:06 +02:00
parent 9f09d90c6d
commit 2f89a9b3e8
2 changed files with 2 additions and 2 deletions

View file

@ -302,7 +302,7 @@
in_progress = true;
var udargs = ((netargs.length) ? '/' + netargs : '');
var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0);
var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0) + '&top=' + ($(document).scrollTop() != 0 ? '0' : '1');
$.get(update_url,function(data) {
in_progress = false;

View file

@ -14,7 +14,7 @@ function update_network_content(&$a) {
echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
$no_auto_update = get_pconfig($profile_uid, "system", "no_auto_update");
if ($no_auto_update <= 0) {
if (($no_auto_update <= 0) OR ($_GET['top'] == 1)) {
$text = network_content($a,$profile_uid);
if ($no_auto_update < 0)
set_pconfig($profile_uid, "system", "no_auto_update", 1);