mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
moved widget rendering code into ajaxify.renderWidgets
This commit is contained in:
@@ -110,6 +110,22 @@ var ajaxify = {};
|
||||
|
||||
app.processPage();
|
||||
|
||||
ajaxify.renderWidgets(tpl_url, url, location, function(err) {
|
||||
$('#content, #footer').stop(true, true).removeClass('ajaxifying');
|
||||
ajaxify.initialLoad = false;
|
||||
|
||||
app.refreshTitle(url);
|
||||
$(window).trigger('action:ajaxify.end', { url: url });
|
||||
});
|
||||
}, url);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
ajaxify.renderWidgets = function(tpl_url, url, location, callback) {
|
||||
var widgetLocations = [];
|
||||
|
||||
require(['vendor/async'], function(async) {
|
||||
@@ -136,21 +152,12 @@ var ajaxify = {};
|
||||
next(err);
|
||||
});
|
||||
}, function(err) {
|
||||
$('#content, #footer').stop(true, true).removeClass('ajaxifying');
|
||||
ajaxify.initialLoad = false;
|
||||
|
||||
app.refreshTitle(url);
|
||||
$(window).trigger('action:ajaxify.end', { url: url });
|
||||
callback(err);
|
||||
});
|
||||
});
|
||||
}, url);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
ajaxify.refresh = function() {
|
||||
ajaxify.go(ajaxify.currentPage);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user