added translation method to recent's infinite loader

v1.18.x
psychobunny 12 years ago
parent ceac8e2dc9
commit 6c9e28232f

@ -81,18 +81,20 @@ define(function() {
} }
Recent.onTopicsLoaded = function(topics) { Recent.onTopicsLoaded = function(topics) {
var html = templates.prepare(templates['recent'].blocks['topics']).parse({ var html = templates.prepare(templates['recent'].blocks['topics']).parse({
topics: topics topics: topics
}), });
container = $('#topics-container');
translator.translate(html, function(translatedHTML) {
var container = $('#topics-container');
$('#category-no-topics').remove(); $('#category-no-topics').remove();
html = $(html); html = $(html);
container.append(html); container.append(html);
$('span.timeago').timeago(); $('span.timeago').timeago();
app.makeNumbersHumanReadable(html.find('.human-readable-number')); app.makeNumbersHumanReadable(html.find('.human-readable-number'));
});
} }
Recent.loadMoreTopics = function() { Recent.loadMoreTopics = function() {

@ -71,7 +71,6 @@ define(function() {
}); });
function onTopicsLoaded(topics) { function onTopicsLoaded(topics) {
var html = templates.prepare(templates['unread'].blocks['topics']).parse({ var html = templates.prepare(templates['unread'].blocks['topics']).parse({
topics: topics topics: topics
}); });

Loading…
Cancel
Save