forked from 0x2620/pandora
in pandora.js, load embed panel if needed
This commit is contained in:
parent
7d3c7dcfb3
commit
aa76e1d4a2
1 changed files with 26 additions and 29 deletions
|
@ -42,18 +42,12 @@ appPanel
|
||||||
|
|
||||||
theme = legacyThemes[theme] || theme;
|
theme = legacyThemes[theme] || theme;
|
||||||
|
|
||||||
if (isEmbed) {
|
|
||||||
loadOxJS(function() {
|
|
||||||
loadOxUI(loadPandora);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
loadImages(function(images) {
|
loadImages(function(images) {
|
||||||
loadScreen(images);
|
loadScreen(images);
|
||||||
loadOxJS(function() {
|
loadOxJS(function() {
|
||||||
loadOxUI(loadPandora);
|
loadOxUI(loadPandora);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
function loadImages(callback) {
|
function loadImages(callback) {
|
||||||
// Opera doesn't fire onload for SVGs,
|
// Opera doesn't fire onload for SVGs,
|
||||||
|
@ -171,7 +165,7 @@ appPanel
|
||||||
|
|
||||||
function loadOxUI(callback) {
|
function loadOxUI(callback) {
|
||||||
Ox.load({
|
Ox.load({
|
||||||
UI: {theme: theme, showScreen: isEmbed, hideScreen: isEmbed},
|
UI: {theme: theme},
|
||||||
Geo: {}
|
Geo: {}
|
||||||
}, callback);
|
}, callback);
|
||||||
}
|
}
|
||||||
|
@ -316,6 +310,9 @@ appPanel
|
||||||
}
|
}
|
||||||
|
|
||||||
Ox.Theme(pandora.user.ui.theme);
|
Ox.Theme(pandora.user.ui.theme);
|
||||||
|
if (isEmbed) {
|
||||||
|
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
|
||||||
|
} else {
|
||||||
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);
|
||||||
|
@ -331,12 +328,12 @@ appPanel
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
|
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
|
||||||
|
|
||||||
if (localStorage && localStorage['pandora.onload']) {
|
if (localStorage && localStorage['pandora.onload']) {
|
||||||
try {
|
try {
|
||||||
eval(localStorage['pandora.onload'])
|
eval(localStorage['pandora.onload'])
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue