From 74377bd4b4c9100dc331e1c366a41df408b765b4 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 5 Aug 2014 21:57:46 -0700 Subject: a bit of cleanup on directory autoscroll --- mod/directory.php | 13 +++++++++---- view/js/main.js | 6 ++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index d71a5584a..8dbed4115 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -199,13 +199,18 @@ function directory_content(&$a) { $a->data['directory_keywords'] = $j['keywords']; } - logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DEBUG); + logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA); if($_REQUEST['aj']) { - $o = replace_macros(get_markup_template('directajax.tpl'),array( - '$entries' => $entries - )); + if($entries) { + $o = replace_macros(get_markup_template('directajax.tpl'),array( + '$entries' => $entries + )); + } + else { + $o = '
'; + } echo $o; killme(); } diff --git a/view/js/main.js b/view/js/main.js index 417063b5a..919a569bd 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -408,6 +408,12 @@ function updatePageItems(mode,data) { + + var e = data.getElementById('content-complete'); + if(e) { + pageHasMoreContent = false; + } + if(mode === 'append') { $(data).each(function() { $('#page-end').before($(this)); -- cgit v1.2.3