forked from 0x2620/pandora
handle preferences part; add pandora.setTheme
This commit is contained in:
parent
28dcc7ce42
commit
d1ab4beb36
1 changed files with 17 additions and 0 deletions
|
@ -1297,6 +1297,11 @@ pandora.getPart = function(state, str, callback) {
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
} else if (state.page == 'preferences') {
|
||||||
|
if (Ox.contains(['account', 'appearance', 'advanced'], str)) {
|
||||||
|
state.part = str;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
} else if (state.page == 'tv') {
|
} else if (state.page == 'tv') {
|
||||||
var split = str.split(':'), user, name;
|
var split = str.split(':'), user, name;
|
||||||
if (split.length >= 2) {
|
if (split.length >= 2) {
|
||||||
|
@ -1945,6 +1950,18 @@ pandora.setLocale = function(locale, callback) {
|
||||||
Ox.setLocale(locale, url, callback);
|
Ox.setLocale(locale, url, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pandora.setTheme = function(theme) {
|
||||||
|
var iframe, src;
|
||||||
|
Ox.Theme(theme);
|
||||||
|
iframe = Ox.UI.elements[$('#embed').data('oxid')];
|
||||||
|
if (iframe) {
|
||||||
|
src = iframe.attr('src');
|
||||||
|
if (src && Ox.parseURL(src).hostname == document.location.hostname) {
|
||||||
|
iframe.postMessage('settheme', {theme: theme});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
pandora.unloadWindow = function() {
|
pandora.unloadWindow = function() {
|
||||||
/*
|
/*
|
||||||
// fixme: ajax request has to have async set to false for this to work
|
// fixme: ajax request has to have async set to false for this to work
|
||||||
|
|
Loading…
Reference in a new issue