forked from 0x2620/pandora
when adding annotation, populate date property (fixes #450)
This commit is contained in:
parent
86beba3039
commit
ed150bb5e1
1 changed files with 7 additions and 4 deletions
|
@ -284,16 +284,19 @@ pandora.ui.item = function() {
|
|||
}).bindEvent({
|
||||
addannotation: function(data) {
|
||||
Ox.Log('', 'addAnnotation', data);
|
||||
//async to not capture keyboard input
|
||||
// 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: '',
|
||||
|
|
Loading…
Reference in a new issue