lazy format annotation date

This commit is contained in:
rolux 2012-06-16 15:24:09 +00:00
parent c540f61f3d
commit 8cb6bd85ab
2 changed files with 1 additions and 5 deletions

View File

@ -69,14 +69,11 @@ pandora.ui.editor = function(data) {
Ox.Log('', 'addAnnotation', data);
// async to not capture keyboard input
setTimeout(function() {
var d = new Date(),
created = Ox.formatDate(d, '%Y-%m-%dT%H:%M:%SZ'),
date = Ox.formatDate(d, '%B %e, %Y'),
var created = Ox.formatDate(new Date(), '%Y-%m-%dT%H:%M:%SZ'),
type = Ox.getObjectById(pandora.site.layers, data.layer).type;
that.addAnnotation(data.layer, Ox.extend(
{
created: created,
date: date,
duration: data.out - data['in'],
editable: true,
id: '_' + Ox.uid(),

View File

@ -880,7 +880,6 @@ pandora.getVideoOptions = function(data) {
pandora.site.layers.forEach(function(layer, i) {
options.annotations[i] = Ox.extend({}, layer, {
items: data.layers[layer.id].map(function(annotation) {
annotation.date = Ox.formatDate(annotation.modified.slice(0, 10), '%B %e, %Y');
annotation.duration = Math.abs(annotation.out - annotation['in']);
annotation.editable = annotation.editable
|| annotation.user == pandora.user.username