From adc3802d3b4490ab063fb27cec6d2198a2885bb7 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Feb 2012 17:21:29 +0000 Subject: [PATCH] undefined places/events --- static/js/pandora/item.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/static/js/pandora/item.js b/static/js/pandora/item.js index 467a2b9a..5e2249cf 100644 --- a/static/js/pandora/item.js +++ b/static/js/pandora/item.js @@ -285,14 +285,21 @@ pandora.ui.item = function() { Ox.Log('', 'addAnnotation', data); //async to not capture keyboard input setTimeout(function() { - pandora.$ui.editor.addAnnotation(data.layer, { + pandora.$ui.editor.addAnnotation(data.layer, Ox.extend({ duration: data.out - data['in'], editable: true, id: '_' + Ox.uid(), 'in': data['in'], out: data.out, - value: '', - }); + value: '' + }, + Ox.getObjectById(pandora.site.layers, data.layer).type == 'place' ? { + place: {defined: false} + } : {}, + Ox.getObjectById(pandora.site.layers, data.layer).type == 'event' ? { + event: {defined: false} + } : {} + )); }); }, annotationsfont: function(data) {