move message handling from embedPanel.js to pandora.js
This commit is contained in:
parent
2f56c03281
commit
2c58f8f15e
2 changed files with 14 additions and 12 deletions
|
@ -314,6 +314,19 @@ appPanel
|
|||
Ox.Theme(pandora.user.ui.theme);
|
||||
if (isEmbed) {
|
||||
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
|
||||
Ox.$parent.onMessage({
|
||||
settheme: function(data) {
|
||||
if (Ox.contains(pandora.site.themes, data.theme)) {
|
||||
Ox.Theme(data.theme);
|
||||
}
|
||||
},
|
||||
seturl: function(data) {
|
||||
Ox.print('SET URL', data.url);
|
||||
if (pandora.isEmbedURL(data.url)) {
|
||||
pandora.URL.push(data.url);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
pandora.$ui.appPanel = pandora.ui.appPanel().display();
|
||||
Ox.Request.requests() && pandora.$ui.loadingIcon.start();
|
||||
|
|
|
@ -391,18 +391,7 @@ pandora.ui.embedPanel = function() {
|
|||
pandora_hash: that.reloadPanel
|
||||
});
|
||||
|
||||
Ox.$parent.onMessage({
|
||||
settheme: function(data) {
|
||||
if (Ox.contains(pandora.site.themes, data.theme)) {
|
||||
Ox.Theme(data.theme);
|
||||
}
|
||||
},
|
||||
seturl: function(data) {
|
||||
if (pandora.isEmbedURL(data.url)) {
|
||||
pandora.URL.push(data.url);
|
||||
}
|
||||
}
|
||||
});
|
||||
Ox.$parent.postMessage('loaded');
|
||||
|
||||
return that;
|
||||
|
||||
|
|
Loading…
Reference in a new issue