aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-05 21:57:46 -0700
committerfriendica <info@friendica.com>2014-08-05 21:57:46 -0700
commit74377bd4b4c9100dc331e1c366a41df408b765b4 (patch)
tree9bdd3f3518d2abcafed6e325ad18b493640aea5c
parentdc98e6c0e9403066c95cebe1d7eb919281a9e1cd (diff)
downloadvolse-hubzilla-74377bd4b4c9100dc331e1c366a41df408b765b4.tar.gz
volse-hubzilla-74377bd4b4c9100dc331e1c366a41df408b765b4.tar.bz2
volse-hubzilla-74377bd4b4c9100dc331e1c366a41df408b765b4.zip
a bit of cleanup on directory autoscroll
-rw-r--r--mod/directory.php13
-rw-r--r--view/js/main.js6
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 = '<div id="content-complete"></div>';
+ }
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));