mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
closes #519
This commit is contained in:
@@ -765,7 +765,7 @@ define(function() {
|
|||||||
|
|
||||||
|
|
||||||
var pagination;
|
var pagination;
|
||||||
var postcount = templates.get('postcount');
|
Topic.postCount = templates.get('postcount');
|
||||||
|
|
||||||
function updateHeader() {
|
function updateHeader() {
|
||||||
if (pagination == null) {
|
if (pagination == null) {
|
||||||
@@ -784,9 +784,9 @@ define(function() {
|
|||||||
var scrollTop = jQuery(window).scrollTop();
|
var scrollTop = jQuery(window).scrollTop();
|
||||||
var scrollBottom = scrollTop + windowHeight;
|
var scrollBottom = scrollTop + windowHeight;
|
||||||
|
|
||||||
if (scrollTop < 50 && postcount > 1) {
|
if (scrollTop < 50 && Topic.postCount > 1) {
|
||||||
localStorage.removeItem("topic:" + tid + ":bookmark");
|
localStorage.removeItem("topic:" + tid + ":bookmark");
|
||||||
pagination.innerHTML = '0 out of ' + postcount;
|
pagination.innerHTML = '0 out of ' + Topic.postCount;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -812,13 +812,13 @@ define(function() {
|
|||||||
smallestNonNegative = Number.MAX_VALUE;
|
smallestNonNegative = Number.MAX_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pagination.innerHTML = this.postnumber + ' out of ' + postcount;
|
pagination.innerHTML = this.postnumber + ' out of ' + Topic.postCount;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (scrollTop + windowHeight == jQuery(document).height()) {
|
if (scrollTop + windowHeight == jQuery(document).height()) {
|
||||||
pagination.innerHTML = postcount + ' out of ' + postcount;
|
pagination.innerHTML = Topic.postCount + ' out of ' + Topic.postCount;
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
@@ -929,7 +929,8 @@ define(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updatePostCount() {
|
function updatePostCount() {
|
||||||
$('#topic-post-count').html($('#post-container li[data-pid]:not(.deleted)').length);
|
Topic.postCount = $('#post-container li[data-pid]:not(.deleted)').length;
|
||||||
|
$('#topic-post-count').html(Topic.postCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadMorePosts(tid, callback) {
|
function loadMorePosts(tid, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user