From bbcff6a0a58e9ad296c16ae579eba2e8905e7335 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 30 May 2014 15:29:17 -0400 Subject: [PATCH] moved widget rendering up a bit --- public/src/app.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index f0638e8a6a..d555c29f7d 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -493,18 +493,18 @@ var socket, app.load = function() { $('document').ready(function () { - var url = window.location.pathname.slice(1), + var url = window.location.pathname.slice(1).replace(/\/$/, ""), search = window.location.search, hash = window.location.hash, tpl_url = ajaxify.getTemplateMapping(url), $window = $(window); - url = url.replace(/\/$/, ""); - if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) { url = url.slice(RELATIVE_PATH.length); } + ajaxify.widgets.render(tpl_url, url); + $window.trigger('action:ajaxify.start', { url: url }); @@ -531,8 +531,6 @@ var socket, ajaxify.currentPage = url; app.processPage(); - ajaxify.widgets.render(tpl_url, url); - if (window.history && window.history.replaceState) { window.history.replaceState({ url: url + search + hash