forked from 0x2620/pandora
place/event annotations always need a place/event object. set formated date on annotations
This commit is contained in:
parent
765cd51367
commit
40ee2a0860
4 changed files with 15 additions and 6 deletions
|
|
@ -350,6 +350,8 @@ pandora.ui.item = function() {
|
|||
Ox.Log('', 'editAnnotation', data);
|
||||
function callback(result) {
|
||||
Ox.Log('', 'editAnnotation result', result);
|
||||
result.data.date = Ox.formatDate(result.data.modified.substr(0, 10),
|
||||
'%B %e, %Y');
|
||||
pandora.$ui.editor.updateAnnotation(data.id, result.data);
|
||||
};
|
||||
if (data.id[0] == '_') {
|
||||
|
|
|
|||
|
|
@ -831,6 +831,7 @@ pandora.getVideoOptions = function(data) {
|
|||
pandora.site.layers.forEach(function(layer, i) {
|
||||
options.layers[i] = Ox.extend({}, layer, {
|
||||
items: data.layers[layer.id].map(function(annotation) {
|
||||
annotation.date = Ox.formatDate(annotation.modified.substr(0, 10), '%B %e, %Y');
|
||||
annotation.duration = Math.abs(annotation.out - annotation['in']);
|
||||
annotation.editable = annotation.editable
|
||||
|| annotation.user == pandora.user.username
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue