From ed150bb5e1b459aae3860dc87e3ff5502ddea967 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 15 Feb 2012 21:29:12 +0000 Subject: [PATCH] when adding annotation, populate date property (fixes #450) --- static/js/pandora/item.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/item.js b/static/js/pandora/item.js index f954c5d6b..54b3556b7 100644 --- a/static/js/pandora/item.js +++ b/static/js/pandora/item.js @@ -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: '',