lazy format annotation date
This commit is contained in:
parent
c540f61f3d
commit
8cb6bd85ab
2 changed files with 1 additions and 5 deletions
|
@ -69,14 +69,11 @@ pandora.ui.editor = function(data) {
|
||||||
Ox.Log('', 'addAnnotation', data);
|
Ox.Log('', 'addAnnotation', data);
|
||||||
// async to not capture keyboard input
|
// async to not capture keyboard input
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var d = new Date(),
|
var created = Ox.formatDate(new Date(), '%Y-%m-%dT%H:%M:%SZ'),
|
||||||
created = Ox.formatDate(d, '%Y-%m-%dT%H:%M:%SZ'),
|
|
||||||
date = Ox.formatDate(d, '%B %e, %Y'),
|
|
||||||
type = Ox.getObjectById(pandora.site.layers, data.layer).type;
|
type = Ox.getObjectById(pandora.site.layers, data.layer).type;
|
||||||
that.addAnnotation(data.layer, Ox.extend(
|
that.addAnnotation(data.layer, Ox.extend(
|
||||||
{
|
{
|
||||||
created: created,
|
created: created,
|
||||||
date: date,
|
|
||||||
duration: data.out - data['in'],
|
duration: data.out - data['in'],
|
||||||
editable: true,
|
editable: true,
|
||||||
id: '_' + Ox.uid(),
|
id: '_' + Ox.uid(),
|
||||||
|
|
|
@ -880,7 +880,6 @@ pandora.getVideoOptions = function(data) {
|
||||||
pandora.site.layers.forEach(function(layer, i) {
|
pandora.site.layers.forEach(function(layer, i) {
|
||||||
options.annotations[i] = Ox.extend({}, layer, {
|
options.annotations[i] = Ox.extend({}, layer, {
|
||||||
items: data.layers[layer.id].map(function(annotation) {
|
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.duration = Math.abs(annotation.out - annotation['in']);
|
||||||
annotation.editable = annotation.editable
|
annotation.editable = annotation.editable
|
||||||
|| annotation.user == pandora.user.username
|
|| annotation.user == pandora.user.username
|
||||||
|
|
Loading…
Reference in a new issue