forked from 0x2620/pandora
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:
parent
dde8e55507
commit
208a38c419
1 changed files with 28 additions and 22 deletions
|
@ -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,33 +345,39 @@ appPanel
|
|||
});
|
||||
} else if (isPrint) {
|
||||
pandora.$ui.printView = pandora.ui.printView().display();
|
||||
} else if (isHome) {
|
||||
pandora.$ui.home = pandora.ui.home().showScreen(initPandoraApp);
|
||||
} else {
|
||||
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
||||
Ox.Request.requests() && pandora.$ui.loadingIcon.start();
|
||||
pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start);
|
||||
pandora.$ui.body.ajaxStop(pandora.$ui.loadingIcon.stop);
|
||||
Ox.Request.bindEvent({
|
||||
error: pandora.ui.errorDialog,
|
||||
request: function(data) {
|
||||
pandora.$ui.loadingIcon.options({
|
||||
tooltip: (data.requests || 'No')
|
||||
+ ' request'
|
||||
+ (data.requests == 1 ? '' : 's')
|
||||
});
|
||||
}
|
||||
});
|
||||
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
|
||||
if (getLocalStorage('pandora.onload')) {
|
||||
try {
|
||||
eval(localStorage['pandora.onload'])
|
||||
} catch(e) {}
|
||||
}
|
||||
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);
|
||||
pandora.$ui.body.ajaxStop(pandora.$ui.loadingIcon.stop);
|
||||
Ox.Request.bindEvent({
|
||||
error: pandora.ui.errorDialog,
|
||||
request: function(data) {
|
||||
pandora.$ui.loadingIcon.options({
|
||||
tooltip: (data.requests || 'No')
|
||||
+ ' request'
|
||||
+ (data.requests == 1 ? '' : 's')
|
||||
});
|
||||
}
|
||||
});
|
||||
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
|
||||
if (getLocalStorage('pandora.onload')) {
|
||||
try {
|
||||
eval(localStorage['pandora.onload'])
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
|
||||
function loadBrowserMessage() {
|
||||
var browsers = [].concat(
|
||||
isMSIE ? [{name: 'Chrome Frame', url: 'http://google.com/chromeframe/'}] : [],
|
||||
|
|
Loading…
Reference in a new issue