mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
fixed indents
This commit is contained in:
@@ -370,31 +370,31 @@ var socket,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (data.posts[0].uid !== app.uid) {
|
if (data.posts[0].uid !== app.uid) {
|
||||||
data.posts[0].display_moderator_tools = 'none';
|
data.posts[0].display_moderator_tools = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeAlreadyAddedPosts() {
|
function removeAlreadyAddedPosts() {
|
||||||
data.posts = data.posts.filter(function(post) {
|
data.posts = data.posts.filter(function(post) {
|
||||||
return $('#post-container li[data-pid="' + post.pid +'"]').length === 0;
|
return $('#post-container li[data-pid="' + post.pid +'"]').length === 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function findInsertionPoint() {
|
function findInsertionPoint() {
|
||||||
var after = null,
|
var after = null,
|
||||||
firstPid = data.posts[0].pid;
|
firstPid = data.posts[0].pid;
|
||||||
$('#post-container li[data-pid]').each(function() {
|
$('#post-container li[data-pid]').each(function() {
|
||||||
if(parseInt(firstPid, 10) > parseInt($(this).attr('data-pid'), 10))
|
if(parseInt(firstPid, 10) > parseInt($(this).attr('data-pid'), 10))
|
||||||
after = $(this);
|
after = $(this);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
return after;
|
return after;
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAlreadyAddedPosts();
|
removeAlreadyAddedPosts();
|
||||||
if(!data.posts.length)
|
if(!data.posts.length)
|
||||||
return;
|
return;
|
||||||
var insertAfter = findInsertionPoint();
|
var insertAfter = findInsertionPoint();
|
||||||
|
|
||||||
var html = templates.prepare(templates['topic'].blocks['posts']).parse(data);
|
var html = templates.prepare(templates['topic'].blocks['posts']).parse(data);
|
||||||
translator.translate(html, function(translatedHTML) {
|
translator.translate(html, function(translatedHTML) {
|
||||||
|
|||||||
Reference in New Issue
Block a user