only return instances if requested

This commit is contained in:
j 2012-01-19 17:27:47 +05:30
parent 2180021421
commit ff3f1c3399
3 changed files with 2 additions and 5 deletions

View file

@ -207,9 +207,6 @@ class File(models.Model):
return False
def json(self, keys=None, user=None):
#FIXME: why?
if keys and not 'instances' in keys:
keys.append('instances')
resolution = (self.width, self.height)
if resolution == (0, 0):
resolution = None

View file

@ -183,7 +183,7 @@ pandora.ui.filesView = function(options, self) {
}
}), callback);
},
keys: ['wanted'],
keys: ['wanted', 'instances'],
scrollbarVisible: true,
sort: [{key: 'path', operator: '+'}]
})

View file

@ -167,8 +167,8 @@ pandora.ui.infoView = function(data) {
.append(
Ox.Editable({
clickLink: pandora.clickLink,
placeholder: formatLight('unknown'),
editable: isEditable,
placeholder: formatLight('unknown'),
tooltip: isEditable ? 'Doubleclick to edit' : '',
type: 'textarea',
value: data.description || ''