when adding annotation, populate date property (fixes #450)

This commit is contained in:
rolux 2012-02-15 21:29:12 +00:00
parent 86beba3039
commit ed150bb5e1

View file

@ -286,14 +286,17 @@ pandora.ui.item = function() {
Ox.Log('', 'addAnnotation', data);
// async to not capture keyboard input
setTimeout(function() {
var now = Ox.formatDate(Date(), '%Y-%m-%dT%H:%M:%SZ');
var d = new Date(),
created = Ox.formatDate(d, '%Y-%m-%dT%H:%M:%SZ'),
date = Ox.formatDate(d, '%B %e, %Y');
pandora.$ui.editor.addAnnotation(data.layer, Ox.extend({
created: now,
created: created,
date: date,
duration: data.out - data['in'],
editable: true,
id: '_' + Ox.uid(),
'in': data['in'],
modified: now,
modified: created,
out: data.out,
user: pandora.user.username,
value: '',