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) 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.setLocale(pandora.user.ui.locale, function() {
pandora.URL.init().parse(function() { pandora.URL.init().parse(function() {
var isHome = Ox.contains(['/', '/home'], document.location.pathname);
if (data.browserSupported) { if (data.browserSupported) {
stopAnimation(); stopAnimation();
$('#loadingScreen').remove(); $('#loadingScreen').remove();
} else { } else {
loadBrowserMessage(); loadBrowserMessage();
} }
Ox.Theme(pandora.user.ui.theme); Ox.Theme(pandora.user.ui.theme);
if (isEmbed) { if (isEmbed) {
pandora.$ui.embedPanel = pandora.ui.embedPanel().display(); pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
@ -345,7 +345,17 @@ appPanel
}); });
} else if (isPrint) { } else if (isPrint) {
pandora.$ui.printView = pandora.ui.printView().display(); pandora.$ui.printView = pandora.ui.printView().display();
} else if (isHome) {
pandora.$ui.home = pandora.ui.home().showScreen(initPandoraApp);
} else { } else {
initPandoraApp();
}
});
});
}
function initPandoraApp() {
pandora.$ui.appPanel = pandora.ui.appPanel().display(); pandora.$ui.appPanel = pandora.ui.appPanel().display();
Ox.Request.requests() && pandora.$ui.loadingIcon.start(); Ox.Request.requests() && pandora.$ui.loadingIcon.start();
pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start); pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start);
@ -367,10 +377,6 @@ appPanel
} catch(e) {} } catch(e) {}
} }
} }
});
});
}
function loadBrowserMessage() { function loadBrowserMessage() {
var browsers = [].concat( var browsers = [].concat(