This commit is contained in:
barisusakli
2015-07-06 14:33:43 -04:00
parent 2d70733fa5
commit ffd22f50ff
28 changed files with 111 additions and 110 deletions

View File

@@ -13,7 +13,7 @@ define('forum/topic/posts', [
var Posts = {};
Posts.onNewPost = function(data) {
var tid = ajaxify.variables.get('topic_id');
var tid = ajaxify.data.tid;
if (data && data.posts && data.posts.length && parseInt(data.posts[0].tid, 10) !== parseInt(tid, 10)) {
return;
}
@@ -133,9 +133,9 @@ define('forum/topic/posts', [
findInsertionPoint();
data.title = $('<div></div>').text(ajaxify.variables.get('topic_name')).html();
data.slug = ajaxify.variables.get('topic_slug');
data.viewcount = ajaxify.variables.get('viewcount');
data.title = $('<div></div>').text(ajaxify.data.title).html();
data.slug = ajaxify.data.slug;
data.viewcount = ajaxify.data.viewcount;
infinitescroll.parseAndTranslate('topic', 'posts', data, function(html) {
if (after) {
@@ -219,7 +219,7 @@ define('forum/topic/posts', [
};
function loadPostsAfter(after) {
var tid = ajaxify.variables.get('topic_id');
var tid = ajaxify.data.tid;
if (!utils.isNumber(tid) || !utils.isNumber(after) || (after === 0 && components.get('post', 'index', 1).length)) {
return;
}