From c0e31e03f2983db2bee05545c2af3ad4ff5560c6 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Jun 2013 12:27:27 +0000 Subject: [PATCH] revert last commit --- static/js/pandora/list.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/static/js/pandora/list.js b/static/js/pandora/list.js index 2fed3503..9d0096bf 100644 --- a/static/js/pandora/list.js +++ b/static/js/pandora/list.js @@ -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(