use Ox.Message
This commit is contained in:
parent
1e17102e4b
commit
b7f417c29d
6 changed files with 81 additions and 53 deletions
|
|
@ -314,15 +314,16 @@ appPanel
|
|||
Ox.Theme(pandora.user.ui.theme);
|
||||
if (isEmbed) {
|
||||
pandora.$ui.embedPanel = pandora.ui.embedPanel().display();
|
||||
window.addEventListener('message', function(e) {
|
||||
var data = {};
|
||||
try {
|
||||
data = JSON.parse(e.data);
|
||||
} catch(e) {}
|
||||
if (Ox.contains(pandora.site.themes, data.theme)) {
|
||||
Ox.Theme(data.theme);
|
||||
} else if (pandora.isEmbedURL(data.url)) {
|
||||
pandora.URL.push(data.url);
|
||||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue