in pandora.js, load embed panel if needed

This commit is contained in:
rolux 2013-02-18 15:48:03 +05:30
parent 7d3c7dcfb3
commit aa76e1d4a2

View file

@ -42,18 +42,12 @@ appPanel
theme = legacyThemes[theme] || theme;
if (isEmbed) {
loadOxJS(function() {
loadOxUI(loadPandora);
});
} else {
loadImages(function(images) {
loadScreen(images);
loadOxJS(function() {
loadOxUI(loadPandora);
});
});
}
function loadImages(callback) {
// Opera doesn't fire onload for SVGs,
@ -171,7 +165,7 @@ appPanel
function loadOxUI(callback) {
Ox.load({
UI: {theme: theme, showScreen: isEmbed, hideScreen: isEmbed},
UI: {theme: theme},
Geo: {}
}, callback);
}
@ -316,6 +310,9 @@ appPanel
}
Ox.Theme(pandora.user.ui.theme);
if (isEmbed) {
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
} else {
pandora.$ui.appPanel = pandora.ui.appPanel().display();
Ox.Request.requests() && pandora.$ui.loadingIcon.start();
pandora.$ui.body.ajaxStart(pandora.$ui.loadingIcon.start);
@ -331,12 +328,12 @@ appPanel
}
});
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
if (localStorage && localStorage['pandora.onload']) {
try {
eval(localStorage['pandora.onload'])
} catch(e) {}
}
}
});