forked from 0x2620/pandora
only return instances if requested
This commit is contained in:
parent
2180021421
commit
ff3f1c3399
3 changed files with 2 additions and 5 deletions
|
@ -207,9 +207,6 @@ class File(models.Model):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def json(self, keys=None, user=None):
|
def json(self, keys=None, user=None):
|
||||||
#FIXME: why?
|
|
||||||
if keys and not 'instances' in keys:
|
|
||||||
keys.append('instances')
|
|
||||||
resolution = (self.width, self.height)
|
resolution = (self.width, self.height)
|
||||||
if resolution == (0, 0):
|
if resolution == (0, 0):
|
||||||
resolution = None
|
resolution = None
|
||||||
|
|
|
@ -183,7 +183,7 @@ pandora.ui.filesView = function(options, self) {
|
||||||
}
|
}
|
||||||
}), callback);
|
}), callback);
|
||||||
},
|
},
|
||||||
keys: ['wanted'],
|
keys: ['wanted', 'instances'],
|
||||||
scrollbarVisible: true,
|
scrollbarVisible: true,
|
||||||
sort: [{key: 'path', operator: '+'}]
|
sort: [{key: 'path', operator: '+'}]
|
||||||
})
|
})
|
||||||
|
|
|
@ -167,8 +167,8 @@ pandora.ui.infoView = function(data) {
|
||||||
.append(
|
.append(
|
||||||
Ox.Editable({
|
Ox.Editable({
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
placeholder: formatLight('unknown'),
|
|
||||||
editable: isEditable,
|
editable: isEditable,
|
||||||
|
placeholder: formatLight('unknown'),
|
||||||
tooltip: isEditable ? 'Doubleclick to edit' : '',
|
tooltip: isEditable ? 'Doubleclick to edit' : '',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
value: data.description || ''
|
value: data.description || ''
|
||||||
|
|
Loading…
Reference in a new issue