7 IriSP.serializers.ldt_annotate = { |
7 IriSP.serializers.ldt_annotate = { |
8 types : { |
8 types : { |
9 annotation : { |
9 annotation : { |
10 serialized_name : "annotations", |
10 serialized_name : "annotations", |
11 serializer : function(_data, _source) { |
11 serializer : function(_data, _source) { |
|
12 var _annType = _data.getAnnotationType(); |
12 return { |
13 return { |
13 begin: _data.begin.milliseconds, |
14 begin: _data.begin.milliseconds, |
14 end: _data.end.milliseconds, |
15 end: _data.end.milliseconds, |
15 content: { |
16 content: { |
16 data: _data.description, |
17 data: _data.description, |
17 audio: _data.audio |
18 audio: _data.audio |
18 }, |
19 }, |
19 tags: _data.getTagTexts(), |
20 tags: _data.getTagTexts(), |
20 media: _source.unNamespace(_data.getMedia().id), |
21 media: _data.getMedia().id, |
21 title: _data.title, |
22 title: _data.title, |
22 type_title: _data.getAnnotationType().title, |
23 type_title: _annType.title, |
23 type: ( typeof _data.getAnnotationType().dont_send_id !== "undefined" && _data.getAnnotationType().dont_send_id ? "" : _source.unNamespace(_data.getAnnotationType().id) ) |
24 type: ( typeof _annType.dont_send_id !== "undefined" && _annType.dont_send_id ? "" : _annType.id ) |
24 } |
25 } |
25 } |
26 } |
26 } |
27 } |
27 }, |
28 }, |
28 serialize : function(_source) { |
29 serialize : function(_source) { |