render widgets on cold load

v1.18.x
psychobunny 11 years ago
parent 23c283f06c
commit 6827dbc9c4

@ -99,7 +99,7 @@ var ajaxify = {};
app.processPage();
ajaxify.renderWidgets(tpl_url, url, location, function(err) {
ajaxify.renderWidgets(tpl_url, url, function(err) {
$('#content, #footer').stop(true, true).removeClass('ajaxifying');
ajaxify.initialLoad = false;
@ -131,7 +131,7 @@ var ajaxify = {};
return tpl_url;
}
ajaxify.renderWidgets = function(tpl_url, url, location, callback) {
ajaxify.renderWidgets = function(tpl_url, url, callback) {
var widgetLocations = [];
require(['vendor/async'], function(async) {

@ -627,7 +627,8 @@ var socket,
$('document').ready(function () {
var url = window.location.pathname.slice(1);
var url = window.location.pathname.slice(1),
tpl_url = ajaxify.getTemplateMapping(url);
$(window).trigger('action:ajaxify.start', {
url: url
@ -652,11 +653,14 @@ var socket,
createHeaderTooltips();
ajaxify.renderWidgets(tpl_url, url, function() {
$(window).trigger('action:ajaxify.end', {
url: url
});
});
});
showWelcomeMessage = location.href.indexOf('loggedin') !== -1;
app.loadConfig();

Loading…
Cancel
Save