revert last commit

This commit is contained in:
j 2013-06-04 12:27:27 +00:00
parent 78003ad56f
commit c0e31e03f2

View file

@ -82,10 +82,11 @@ pandora.ui.list = function() {
id: 'list',
items: function(data, callback) {
//Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
return pandora.api.find(Ox.extend(data, {
pandora.api.find(Ox.extend(data, {
query: pandora.user.ui.find,
keys: data.keys ? ['modified'].concat(data.keys) : void 0
}), callback);
return Ox.clone(data, true);
},
scrollbarVisible: true,
selected: pandora.user.ui.listSelection,
@ -160,9 +161,10 @@ pandora.ui.list = function() {
};
},
items: function(data, callback) {
return pandora.api.find(Ox.extend(data, {
pandora.api.find(Ox.extend(data, {
query: pandora.user.ui.find
}), callback);
return Ox.clone(data, true);
},
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
selected: pandora.user.ui.listSelection,
@ -228,7 +230,7 @@ pandora.ui.list = function() {
};
},
items: function(data, callback) {
return pandora.api.find(Ox.extend(data, {
pandora.api.find(Ox.extend(data, {
query: pandora.user.ui.find,
clips: {
query: pandora.getClipsQuery(),
@ -236,6 +238,7 @@ pandora.ui.list = function() {
keys: []
}
}), callback);
return Ox.clone(data, true);
},
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'title', 'videoRatio', 'year'],
selected: pandora.user.ui.listSelection,
@ -344,13 +347,14 @@ pandora.ui.list = function() {
items: function(data, callback) {
var clipsQuery = pandora.getClipsQuery(),
isClipsQuery = !!clipsQuery.conditions.length;
return pandora.api.find(Ox.extend(data, Ox.extend({
pandora.api.find(Ox.extend(data, Ox.extend({
query: pandora.user.ui.find
}, isClipsQuery ? {clips: {
query: clipsQuery,
items: 1000000,
keys: []
}} : {})), callback);
return Ox.clone(data, true);
},
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'rendered', 'title', 'year'],
selected: pandora.user.ui.listSelection,
@ -406,15 +410,15 @@ pandora.ui.list = function() {
});
},
init: function(data) {
var find = pandora.user.ui.find, folder, list;
if (find.conditions.length == 0) {
var folder, list;
if (data.query.conditions.length == 0) {
pandora.$ui.allItems.update(data.items);
} else if (
find.conditions.length == 1
&& find.conditions[0].key == 'list'
&& find.conditions[0].operator == '=='
data.query.conditions.length == 1
&& data.query.conditions[0].key == 'list'
&& data.query.conditions[0].operator == '=='
) {
list = find.conditions[0].value;
list = data.query.conditions[0].value;
folder = pandora.getListData(list).folder;
if (pandora.$ui.folderList[folder]) {
pandora.$ui.folderList[folder].value(