forked from 0x2620/pandora
revert last commit
This commit is contained in:
parent
78003ad56f
commit
c0e31e03f2
1 changed files with 14 additions and 10 deletions
|
@ -82,10 +82,11 @@ pandora.ui.list = function() {
|
||||||
id: 'list',
|
id: 'list',
|
||||||
items: function(data, callback) {
|
items: function(data, callback) {
|
||||||
//Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
|
//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,
|
query: pandora.user.ui.find,
|
||||||
keys: data.keys ? ['modified'].concat(data.keys) : void 0
|
keys: data.keys ? ['modified'].concat(data.keys) : void 0
|
||||||
}), callback);
|
}), callback);
|
||||||
|
return Ox.clone(data, true);
|
||||||
},
|
},
|
||||||
scrollbarVisible: true,
|
scrollbarVisible: true,
|
||||||
selected: pandora.user.ui.listSelection,
|
selected: pandora.user.ui.listSelection,
|
||||||
|
@ -160,9 +161,10 @@ pandora.ui.list = function() {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
items: function(data, callback) {
|
items: function(data, callback) {
|
||||||
return pandora.api.find(Ox.extend(data, {
|
pandora.api.find(Ox.extend(data, {
|
||||||
query: pandora.user.ui.find
|
query: pandora.user.ui.find
|
||||||
}), callback);
|
}), callback);
|
||||||
|
return Ox.clone(data, true);
|
||||||
},
|
},
|
||||||
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
|
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
|
||||||
selected: pandora.user.ui.listSelection,
|
selected: pandora.user.ui.listSelection,
|
||||||
|
@ -228,7 +230,7 @@ pandora.ui.list = function() {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
items: function(data, callback) {
|
items: function(data, callback) {
|
||||||
return pandora.api.find(Ox.extend(data, {
|
pandora.api.find(Ox.extend(data, {
|
||||||
query: pandora.user.ui.find,
|
query: pandora.user.ui.find,
|
||||||
clips: {
|
clips: {
|
||||||
query: pandora.getClipsQuery(),
|
query: pandora.getClipsQuery(),
|
||||||
|
@ -236,6 +238,7 @@ pandora.ui.list = function() {
|
||||||
keys: []
|
keys: []
|
||||||
}
|
}
|
||||||
}), callback);
|
}), callback);
|
||||||
|
return Ox.clone(data, true);
|
||||||
},
|
},
|
||||||
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'title', 'videoRatio', 'year'],
|
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'title', 'videoRatio', 'year'],
|
||||||
selected: pandora.user.ui.listSelection,
|
selected: pandora.user.ui.listSelection,
|
||||||
|
@ -344,13 +347,14 @@ pandora.ui.list = function() {
|
||||||
items: function(data, callback) {
|
items: function(data, callback) {
|
||||||
var clipsQuery = pandora.getClipsQuery(),
|
var clipsQuery = pandora.getClipsQuery(),
|
||||||
isClipsQuery = !!clipsQuery.conditions.length;
|
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
|
query: pandora.user.ui.find
|
||||||
}, isClipsQuery ? {clips: {
|
}, isClipsQuery ? {clips: {
|
||||||
query: clipsQuery,
|
query: clipsQuery,
|
||||||
items: 1000000,
|
items: 1000000,
|
||||||
keys: []
|
keys: []
|
||||||
}} : {})), callback);
|
}} : {})), callback);
|
||||||
|
return Ox.clone(data, true);
|
||||||
},
|
},
|
||||||
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'rendered', 'title', 'year'],
|
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'rendered', 'title', 'year'],
|
||||||
selected: pandora.user.ui.listSelection,
|
selected: pandora.user.ui.listSelection,
|
||||||
|
@ -406,15 +410,15 @@ pandora.ui.list = function() {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
init: function(data) {
|
init: function(data) {
|
||||||
var find = pandora.user.ui.find, folder, list;
|
var folder, list;
|
||||||
if (find.conditions.length == 0) {
|
if (data.query.conditions.length == 0) {
|
||||||
pandora.$ui.allItems.update(data.items);
|
pandora.$ui.allItems.update(data.items);
|
||||||
} else if (
|
} else if (
|
||||||
find.conditions.length == 1
|
data.query.conditions.length == 1
|
||||||
&& find.conditions[0].key == 'list'
|
&& data.query.conditions[0].key == 'list'
|
||||||
&& find.conditions[0].operator == '=='
|
&& data.query.conditions[0].operator == '=='
|
||||||
) {
|
) {
|
||||||
list = find.conditions[0].value;
|
list = data.query.conditions[0].value;
|
||||||
folder = pandora.getListData(list).folder;
|
folder = pandora.getListData(list).folder;
|
||||||
if (pandora.$ui.folderList[folder]) {
|
if (pandora.$ui.folderList[folder]) {
|
||||||
pandora.$ui.folderList[folder].value(
|
pandora.$ui.folderList[folder].value(
|
||||||
|
|
Loading…
Reference in a new issue