From 9cc8fd30bb19b96f4872e5e9282304c96edbc5da Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 18 Sep 2010 00:14:59 +0000 Subject: [PATCH] fixing regressions with find and groups --- pandora/archive/views.py | 6 +++--- pandora/static/js/pandora.js | 11 ++++++----- pandora/templates/pandora.json | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 62a35ced2..3d9c16f4d 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -72,15 +72,15 @@ def api_update(request): volume, created = models.Volume.objects.get_or_create(user=user, name=data['volume']) all_files = [] for f in data['files']: - print f + #print f path = f['path'] folder = path.split('/') name = folder.pop() if folder and folder[-1] in ('Extras', 'Versions', 'DVDs'): name = '/'.join([folder.pop(), name]) folder = '/'.join(folder) - print folder - print name + #print folder + #print name f['folder'] = folder f['name'] = name oshash = f['oshash'] diff --git a/pandora/static/js/pandora.js b/pandora/static/js/pandora.js index 8d6a9b382..2e4665839 100755 --- a/pandora/static/js/pandora.js +++ b/pandora/static/js/pandora.js @@ -183,7 +183,7 @@ app.Query = (function() { } }) : []), operator = conditions.length < 2 ? '' : ','; // fixme: should be & - Ox.print(groupId, app.user.ui.find, conditions); + Ox.print('>>', groupId, app.user.ui.find, conditions); return { conditions: conditions, operator: operator @@ -393,8 +393,8 @@ app.constructApp = function() { } app.constructGroups = function() { - $groups = []; - var panelWidth = app.$document.width() - app.user.ui.listsSize - 1; + var $groups = [], + panelWidth = app.$document.width() - app.user.ui.listsSize - 1; app.ui.groups = $.map(app.config.groups, function(id, i) { var title = Ox.getObjectById(app.config.sortKeys, id).title, width = app.getGroupWidth(i, panelWidth); @@ -457,6 +457,7 @@ app.constructGroups = function() { }); $.each(app.ui.groups, function(i_, group_) { if (i_ != i) { + Ox.print('setting groups request', i, i_) app.$ui.groups[i_].options({ request: function(data, callback) { delete data.keys; @@ -1523,8 +1524,8 @@ app.constructToolbar = function() { operator: '' } ]; - $.each(groups, function(i, group) { - groups[i].query.conditions = []; + $.each(app.ui.groups, function(i, group) { + group.query.conditions = []; app.$ui.groups[i].options({ request: function(data, callback) { delete data.keys; diff --git a/pandora/templates/pandora.json b/pandora/templates/pandora.json index 02196e0ae..a76bd20e9 100644 --- a/pandora/templates/pandora.json +++ b/pandora/templates/pandora.json @@ -108,7 +108,7 @@ "preferences": {}, "ui": { "columns": ["id", "title", "director", "country", "year", "language", "genre"], - "findQuery": {"conditions": [{"key": "", "value": "", "operator": ""}], "operator": ""}, + "findQuery": {"conditions": [], "operator": ""}, "groupsQuery": {"conditions": [], "operator": "|"}, "groupsSize": 128, "itemView": "info",