Baris Usakli 12 years ago
commit fe6595cd2a

@ -344,24 +344,26 @@ var socket,
app.createNewPosts = function (data) { app.createNewPosts = function (data) {
data.posts[0].display_moderator_tools = 'none'; data.posts[0].display_moderator_tools = 'none';
var html = templates.prepare(templates['topic'].blocks['posts']).parse(data), var html = templates.prepare(templates['topic'].blocks['posts']).parse(data);
uniqueid = new Date().getTime(), translator.translate(html, function(translatedHTML) {
tempContainer = jQuery('<div id="' + uniqueid + '"></div>') var uniqueid = new Date().getTime(),
.appendTo("#post-container") tempContainer = jQuery('<div id="' + uniqueid + '"></div>')
.hide() .appendTo("#post-container")
.append(html) .hide()
.fadeIn('slow'); .append(translatedHTML)
.fadeIn('slow');
for (var x = 0, numPosts = data.posts.length; x < numPosts; x++) {
socket.emit('api:post.privileges', data.posts[x].pid); for (var x = 0, numPosts = data.posts.length; x < numPosts; x++) {
} socket.emit('api:post.privileges', data.posts[x].pid);
}
tempContainer.replaceWith(tempContainer.contents()); tempContainer.replaceWith(tempContainer.contents());
infiniteLoaderActive = false; infiniteLoaderActive = false;
app.populate_online_users(); app.populate_online_users();
app.addCommasToNumbers(); app.addCommasToNumbers();
$('span.timeago').timeago(); $('span.timeago').timeago();
});
} }
app.infiniteLoaderActive = false; app.infiniteLoaderActive = false;

Loading…
Cancel
Save