From d99911654127e2989490326e31fbc4a0d273bf36 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 13 Jul 2014 15:38:17 -0400 Subject: [PATCH] wait for widgets to render to send ajaxify end possible fix for broken masonry on f5 --- public/src/app.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index 023e2bd2c5..514345458b 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -498,7 +498,6 @@ var socket, hash = window.location.hash, $window = $(window); - ajaxify.widgets.render(tpl_url, url); $window.trigger('action:ajaxify.start', { url: url @@ -524,7 +523,6 @@ var socket, createHeaderTooltips(); ajaxify.variables.parse(); ajaxify.currentPage = url; - app.processPage(); if (window.history && window.history.replaceState) { window.history.replaceState({ @@ -533,8 +531,11 @@ var socket, } ajaxify.loadScript(tpl_url, function() { - $window.trigger('action:ajaxify.end', { - url: url + ajaxify.widgets.render(tpl_url, url, function() { + app.processPage(); + $window.trigger('action:ajaxify.end', { + url: url + }); }); }); });