mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 14:23:04 +02:00
no need for setTimeout in ajaxify
This commit is contained in:
@@ -135,19 +135,17 @@ $(document).ready(function() {
|
||||
|
||||
templates.parse(tpl_url, data, function(template) {
|
||||
translator.translate(template, function(translatedTemplate) {
|
||||
setTimeout(function() {
|
||||
$('#content').html(translatedTemplate);
|
||||
$('#content').html(translatedTemplate);
|
||||
|
||||
ajaxify.end(url, tpl_url);
|
||||
ajaxify.end(url, tpl_url);
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
|
||||
$('#content, #footer').removeClass('ajaxifying');
|
||||
$('#content, #footer').removeClass('ajaxifying');
|
||||
|
||||
app.refreshTitle(url);
|
||||
}, animationDuration * 1000 - ((new Date()).getTime() - startTime));
|
||||
app.refreshTitle(url);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user