fixing regressions with find and groups
This commit is contained in:
parent
86ecb97a29
commit
9cc8fd30bb
3 changed files with 10 additions and 9 deletions
|
@ -72,15 +72,15 @@ def api_update(request):
|
||||||
volume, created = models.Volume.objects.get_or_create(user=user, name=data['volume'])
|
volume, created = models.Volume.objects.get_or_create(user=user, name=data['volume'])
|
||||||
all_files = []
|
all_files = []
|
||||||
for f in data['files']:
|
for f in data['files']:
|
||||||
print f
|
#print f
|
||||||
path = f['path']
|
path = f['path']
|
||||||
folder = path.split('/')
|
folder = path.split('/')
|
||||||
name = folder.pop()
|
name = folder.pop()
|
||||||
if folder and folder[-1] in ('Extras', 'Versions', 'DVDs'):
|
if folder and folder[-1] in ('Extras', 'Versions', 'DVDs'):
|
||||||
name = '/'.join([folder.pop(), name])
|
name = '/'.join([folder.pop(), name])
|
||||||
folder = '/'.join(folder)
|
folder = '/'.join(folder)
|
||||||
print folder
|
#print folder
|
||||||
print name
|
#print name
|
||||||
f['folder'] = folder
|
f['folder'] = folder
|
||||||
f['name'] = name
|
f['name'] = name
|
||||||
oshash = f['oshash']
|
oshash = f['oshash']
|
||||||
|
|
|
@ -183,7 +183,7 @@ app.Query = (function() {
|
||||||
}
|
}
|
||||||
}) : []),
|
}) : []),
|
||||||
operator = conditions.length < 2 ? '' : ','; // fixme: should be &
|
operator = conditions.length < 2 ? '' : ','; // fixme: should be &
|
||||||
Ox.print(groupId, app.user.ui.find, conditions);
|
Ox.print('>>', groupId, app.user.ui.find, conditions);
|
||||||
return {
|
return {
|
||||||
conditions: conditions,
|
conditions: conditions,
|
||||||
operator: operator
|
operator: operator
|
||||||
|
@ -393,8 +393,8 @@ app.constructApp = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.constructGroups = function() {
|
app.constructGroups = function() {
|
||||||
$groups = [];
|
var $groups = [],
|
||||||
var panelWidth = app.$document.width() - app.user.ui.listsSize - 1;
|
panelWidth = app.$document.width() - app.user.ui.listsSize - 1;
|
||||||
app.ui.groups = $.map(app.config.groups, function(id, i) {
|
app.ui.groups = $.map(app.config.groups, function(id, i) {
|
||||||
var title = Ox.getObjectById(app.config.sortKeys, id).title,
|
var title = Ox.getObjectById(app.config.sortKeys, id).title,
|
||||||
width = app.getGroupWidth(i, panelWidth);
|
width = app.getGroupWidth(i, panelWidth);
|
||||||
|
@ -457,6 +457,7 @@ app.constructGroups = function() {
|
||||||
});
|
});
|
||||||
$.each(app.ui.groups, function(i_, group_) {
|
$.each(app.ui.groups, function(i_, group_) {
|
||||||
if (i_ != i) {
|
if (i_ != i) {
|
||||||
|
Ox.print('setting groups request', i, i_)
|
||||||
app.$ui.groups[i_].options({
|
app.$ui.groups[i_].options({
|
||||||
request: function(data, callback) {
|
request: function(data, callback) {
|
||||||
delete data.keys;
|
delete data.keys;
|
||||||
|
@ -1523,8 +1524,8 @@ app.constructToolbar = function() {
|
||||||
operator: ''
|
operator: ''
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
$.each(groups, function(i, group) {
|
$.each(app.ui.groups, function(i, group) {
|
||||||
groups[i].query.conditions = [];
|
group.query.conditions = [];
|
||||||
app.$ui.groups[i].options({
|
app.$ui.groups[i].options({
|
||||||
request: function(data, callback) {
|
request: function(data, callback) {
|
||||||
delete data.keys;
|
delete data.keys;
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
"preferences": {},
|
"preferences": {},
|
||||||
"ui": {
|
"ui": {
|
||||||
"columns": ["id", "title", "director", "country", "year", "language", "genre"],
|
"columns": ["id", "title", "director", "country", "year", "language", "genre"],
|
||||||
"findQuery": {"conditions": [{"key": "", "value": "", "operator": ""}], "operator": ""},
|
"findQuery": {"conditions": [], "operator": ""},
|
||||||
"groupsQuery": {"conditions": [], "operator": "|"},
|
"groupsQuery": {"conditions": [], "operator": "|"},
|
||||||
"groupsSize": 128,
|
"groupsSize": 128,
|
||||||
"itemView": "info",
|
"itemView": "info",
|
||||||
|
|
Loading…
Reference in a new issue