forked from 0x2620/pandora
working around a bug where user.ui.lists.foo has nothing but its listView property set
This commit is contained in:
parent
bd7e9bf3c9
commit
19b381bc37
2 changed files with 20 additions and 0 deletions
|
@ -51,6 +51,19 @@ Ox.load({
|
||||||
site: data.site,
|
site: data.site,
|
||||||
user: data.user.level == 'guest' ? Ox.clone(data.site.user) : data.user
|
user: data.user.level == 'guest' ? Ox.clone(data.site.user) : data.user
|
||||||
});
|
});
|
||||||
|
// ---- fixme: remove, server sends wrong data
|
||||||
|
pandora.site.user.ui.lists = {
|
||||||
|
"": {
|
||||||
|
"columns": ["title", "director", "country", "year", "language", "runtime", "genre"],
|
||||||
|
"columnWidth": {},
|
||||||
|
"listView": "grid",
|
||||||
|
"selected": [],
|
||||||
|
"sort": [
|
||||||
|
{"key": "director", "operator": ""}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// ----
|
||||||
Ox.print("USER.UI.LISTS", data.user.ui.lists, "SITE.USER.UI.LISTS", data.site.user.ui.lists)
|
Ox.print("USER.UI.LISTS", data.user.ui.lists, "SITE.USER.UI.LISTS", data.site.user.ui.lists)
|
||||||
Ox.extend(pandora.site, {
|
Ox.extend(pandora.site, {
|
||||||
findKeys: Ox.map(data.site.itemKeys, function(key) {
|
findKeys: Ox.map(data.site.itemKeys, function(key) {
|
||||||
|
|
|
@ -230,6 +230,13 @@ pandora.Query = (function() {
|
||||||
!pandora.user.ui.lists[data.list] && pandora.UI.set(
|
!pandora.user.ui.lists[data.list] && pandora.UI.set(
|
||||||
'lists|' + data.list, pandora.site.user.ui.lists['']
|
'lists|' + data.list, pandora.site.user.ui.lists['']
|
||||||
);
|
);
|
||||||
|
/*
|
||||||
|
// ---- fixme: remove, server sends wrong data
|
||||||
|
!pandora.user.ui.lists[data.list].sort && pandora.UI.set(
|
||||||
|
'lists|' + data.list, pandora.site.user.ui.lists['']
|
||||||
|
);
|
||||||
|
// ----
|
||||||
|
*/
|
||||||
Ox.print('@@@@@', data.lists, pandora.user.ui.lists[data.list])
|
Ox.print('@@@@@', data.lists, pandora.user.ui.lists[data.list])
|
||||||
pandora.UI.set({list: data.list});
|
pandora.UI.set({list: data.list});
|
||||||
pandora.user.ui.find = data.find;
|
pandora.user.ui.find = data.find;
|
||||||
|
|
Loading…
Reference in a new issue