load home screen first, and app panel upon home screen callback (allowing for animation without the app panel blocking rendering)

This commit is contained in:
rolux 2013-07-09 09:04:35 +00:00
parent dde8e55507
commit 208a38c419

View file

@ -318,16 +318,16 @@ appPanel
videoFormat: Ox.UI.getVideoFormat(pandora.site.video.formats)
});
// set up url controller
// set locale and initialize url controller
pandora.setLocale(pandora.user.ui.locale, function() {
pandora.URL.init().parse(function() {
var isHome = Ox.contains(['/', '/home'], document.location.pathname);
if (data.browserSupported) {
stopAnimation();
$('#loadingScreen').remove();
} else {
loadBrowserMessage();
}
Ox.Theme(pandora.user.ui.theme);
if (isEmbed) {
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
@ -345,7 +345,17 @@ appPanel
});
} else if (isPrint) {
pandora.$ui.printView = pandora.ui.printView().display();
} else if (isHome) {
pandora.$ui.home = pandora.ui.home().showScreen(initPandoraApp);
} else {
initPandoraApp();
}
});
});
}
function initPandoraApp() {
pandora.$ui.appPanel = pandora.ui.appPanel().display();
Ox.Request.requests() && pandora.$ui.loadingIcon.start();
pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start);
@ -367,10 +377,6 @@ appPanel
} catch(e) {}
}
}
});
});
}
function loadBrowserMessage() {
var browsers = [].concat(