mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
moved infinitescroll.parseAndTranslate to app.parseAndTranslate
This commit is contained in:
@@ -497,5 +497,20 @@ app.cacheBuster = null;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
app.parseAndTranslate = function(template, blockName, data, callback) {
|
||||
if (typeof blockName === 'string') {
|
||||
templates.parse(template, blockName, data, function(html) {
|
||||
translator.translate(html, function(translatedHTML) {
|
||||
callback($(translatedHTML));
|
||||
});
|
||||
});
|
||||
} else {
|
||||
callback = data, data = blockName;
|
||||
templates.parse(template, data, function(html) {
|
||||
translator.translate(html, function(translatedHTML) {
|
||||
callback($(translatedHTML));
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user