added translation method to recent's infinite loader

This commit is contained in:
psychobunny
2013-12-07 16:21:12 -05:00
parent ceac8e2dc9
commit 6c9e28232f
2 changed files with 10 additions and 9 deletions

View File

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

View File

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