dont overwrite guest session, set ui._ once

This commit is contained in:
rolux 2011-11-04 15:56:38 +00:00
parent 60c54bb7d5
commit d54463474e
2 changed files with 6 additions and 19 deletions

View file

@ -14,7 +14,7 @@ appPanel
contentPanel
browser <-- should be filters or browser
list or item
statusbar
statusbar <-- make part of content panel
*/
(function() {
@ -199,9 +199,13 @@ appPanel
})
},
site: data.site,
user: data.user.level == 'guest' ? Ox.clone(data.site.user) : data.user
user: data.user
});
pandora.user.ui = Ox.extend(
Ox.clone(pandora.site.user.ui), pandora.user.ui
);
Ox.extend(pandora.site, {
clipKeys: Ox.map(data.site.clipKeys, function(key) {
return Ox.extend(key, {

View file

@ -112,9 +112,6 @@ pandora.URL = (function() {
function setState(state, callback) {
Ox.Log('', 'SET STATE:', state)
var find, previousUI = pandora.UI.getPrevious();
pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find);
pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find);
pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find);
@ -123,13 +120,6 @@ pandora.URL = (function() {
if (pandora.user.ui.showHome) {
pandora.$ui.home = pandora.ui.home().showScreen();
} else {
/*
pandora.UI.set({
section: 'items',
item: ''
});
*/
}
callback && callback();
@ -207,18 +197,11 @@ pandora.URL = (function() {
if (state.find) {
if (!state.item) {
find = state.find;
set.find = state.find;
} else if (pandora.isItemFind(state.find)) {
set.itemFind = state.find;
}
}
if (!find) {
find = pandora.user.ui.find;
pandora.user.ui._list = pandora.getListsState(find)
pandora.user.ui._groupsState = pandora.getGroupsState(find);
pandora.user.ui._findState = pandora.getFindState(find);
}
Ox.Request.cancel();
$('video').each(function() {