update video editor

This commit is contained in:
rolux 2012-01-15 20:35:37 +05:30
commit 84cdd2ebf5
13 changed files with 155 additions and 44 deletions

View file

@ -118,7 +118,6 @@ class Annotation(models.Model):
}
for key in ('id', 'in', 'out', 'value', 'created', 'modified'):
j[key] = getattr(self, {
'duration': 'clip__duration',
'hue': 'clip__hue',
'id': 'public_id',
'in': 'start',
@ -127,6 +126,7 @@ class Annotation(models.Model):
'saturation': 'clip__saturation',
'volume': 'clip__volume',
}.get(key, key))
j['duration'] = j['out'] - j['in']
l = self.get_layer()
if l['type'] == 'place':

View file

@ -142,6 +142,7 @@ def addAnnotation(request):
value=data['value'])
annotation.save()
response = json_response(annotation.json())
response['data']['editable'] = True
else:
response = json_response(status=403, text='permission denied')
return render_to_json_response(response)
@ -198,6 +199,7 @@ def editAnnotation(request):
}.get(key,key), data[key])
a.save()
response['data'] = a.json()
response['data']['editable'] = True
else:
response = json_response(status=403, text='permission denied')
return render_to_json_response(response)