From bc5c2d624cd9e282da23451390f06282abf0143c Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 19 Sep 2014 16:23:03 +0400 Subject: [PATCH] App init bugfixes --- app/js/init.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/app/js/init.js b/app/js/init.js index 16d8e536..8a48bf23 100644 --- a/app/js/init.js +++ b/app/js/init.js @@ -81,7 +81,20 @@ i18n_ng: Config.I18n.locale == defaultLocale, // Already included i18n_messages: false, i18n_fallback: false - } + }, + checkReady = function checkReady () { + var i, ready = true; + for (i in bootReady) { + if (bootReady.hasOwnProperty(i) && bootReady[i] === false) { + ready = false; + break; + } + } + if (ready) { + bootReady.boot = false; + angular.bootstrap(document, ['myApp']); + } + }; switch (layout) { case 'mobile': Config.Mobile = true; break; @@ -131,19 +144,5 @@ bootReady.dom = true; checkReady(); }); - - var checkReady = function checkReady () { - var i, ready = true; - for (i in bootReady) { - if (bootReady.hasOwnProperty(i) && bootReady[i] === false) { - ready = false; - break; - } - } - if (ready) { - bootReady.boot = false; - angular.bootstrap(document, ['myApp']); - } - } }); })(); \ No newline at end of file