|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
define(function() {
|
|
|
|
|
var Topic = {},
|
|
|
|
|
infiniteLoaderActive = false;
|
|
|
|
|
|
|
|
|
|
infiniteLoaderActive = false,
|
|
|
|
|
pagination;
|
|
|
|
|
|
|
|
|
|
function showBottomPostBar() {
|
|
|
|
|
if($('#post-container .post-row').length > 1) {
|
|
|
|
@ -775,9 +775,13 @@ define(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pagination;
|
|
|
|
|
|
|
|
|
|
Topic.postCount = templates.get('postcount');
|
|
|
|
|
|
|
|
|
|
window.onscroll = updateHeader;
|
|
|
|
|
window.onload = updateHeader;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function updateHeader() {
|
|
|
|
|
if (pagination == null) {
|
|
|
|
|
jQuery('.pagination-block i:first').on('click', function() {
|
|
|
|
@ -794,6 +798,7 @@ define(function() {
|
|
|
|
|
var scrollBottom = scrollTop + windowHeight;
|
|
|
|
|
var progressBar = $('.progress-bar');
|
|
|
|
|
var progressBarContainer = $('.progress-container');
|
|
|
|
|
var tid = templates.get('topic_id');
|
|
|
|
|
|
|
|
|
|
pagination.parentNode.style.display = 'block';
|
|
|
|
|
progressBarContainer.css('display', '');
|
|
|
|
@ -840,10 +845,6 @@ define(function() {
|
|
|
|
|
}, 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.onscroll = updateHeader;
|
|
|
|
|
window.onload = updateHeader;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Topic.scrollToPost = function(pid) {
|
|
|
|
|
if (!pid) {
|
|
|
|
|
return;
|
|
|
|
@ -944,8 +945,13 @@ define(function() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updatePostCount() {
|
|
|
|
|
Topic.postCount = $('#post-container li[data-pid]:not(.deleted)').length;
|
|
|
|
|
socket.emit('api:topics.postcount', templates.get('topic_id'), function(err, postcount) {
|
|
|
|
|
if(!err) {
|
|
|
|
|
Topic.postCount = postcount;
|
|
|
|
|
$('#topic-post-count').html(Topic.postCount);
|
|
|
|
|
updateHeader();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadMorePosts(tid, callback) {
|
|
|
|
|