Merge branch 'master' of github.com:designcreateplay/NodeBB

v1.18.x
Julian Lam 12 years ago
commit e23198bbcc

@ -353,15 +353,22 @@ var socket,
if(app.infiniteLoaderActive)
return;
app.infiniteLoaderActive = true;
if($('#loading-indicator').attr('done') === '0')
$('#loading-indicator').removeClass('hide');
socket.emit('api:topic.loadMore', {
tid: tid,
after: document.querySelectorAll('#post-container li[data-pid]').length
}, function(data) {
app.infiniteLoaderActive = false;
if(data.posts.length) {
$('#loading-indicator').attr('done', '0');
app.createNewPosts(data);
} else {
$('#loading-indicator').attr('done', '1');
}
$('#loading-indicator').addClass('hide');
if(callback)
callback(data.posts);
});

@ -142,6 +142,9 @@
</li>
<!-- END posts -->
</ul>
<div id="loading-indicator" style="text-align:center;" class="hide" done="0">
<i class="icon-spinner icon-spin icon-large"></i>
</div>
<hr />
<div class="topic-main-buttons">
<button id="post_reply" class="btn btn-primary btn-lg post_reply" type="button">Reply</button>

Loading…
Cancel
Save