diff -r 88017f00714b -r 017f45c5209f player/js/ldt-serializer.js --- a/player/js/ldt-serializer.js Wed Jul 10 11:14:06 2013 +0200 +++ b/player/js/ldt-serializer.js Tue Oct 01 15:59:22 2013 +0200 @@ -44,7 +44,7 @@ "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator, "dc:duration" : _data.duration.milliseconds } - } + }; _dest.medias.push(_res); var _list = { id: IriSP.Model.getUID(), @@ -77,16 +77,15 @@ }).map(function(_at) { return { "id-ref": _at.id - } + }; }) - } + }; _dest.lists.push(_list); _dest.views[0].contents.push(_data.id); } }, tag : { serialized_name : "tags", - model_name : "tag", deserializer : function(_data, _source) { var _res = new IriSP.Model.Tag(_data.id, _source); _res.title = _data.meta["dc:title"]; @@ -106,7 +105,7 @@ "dc:creator" : _data.creator || _source.creator, "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator, } - } + }; _dest.tags.push(_res); } }, @@ -127,7 +126,7 @@ "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified), "dc:creator" : _data.creator || _source.creator, "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator, - } + }; _dest["annotation-types"].push(_res); _dest.views[0].annotation_types.push(_data.id); } @@ -177,11 +176,11 @@ { title : _data.title, description : _data.description, - audio : _data.audio, - img: { - src: _data.thumbnail - } - }, + audio : _data.audio, + img: { + src: _data.thumbnail + } + }, _data.content, { title: "", @@ -198,18 +197,18 @@ "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator, // project : _source.projectId } - } + }; if (_source.regenerateTags) { _res.tags = IriSP._(_data.keywords).map(function(_kw) { return { "id-ref": _source.__keywords[_kw.toLowerCase()].id - } + }; }); } else { _res.tags = IriSP._(_data.tag.id).map(function(_id) { return { "id-ref" : _id - } + }; }); } _res.content.title = _data.title || _res.content.title || ""; @@ -244,7 +243,7 @@ return _annotation.annotation.id; }), id: _data.id - } + }; _dest.lists.push(_res); } } @@ -284,13 +283,13 @@ id: IriSP.Model.getUID(), title: kw, regenerated: true - } + }; } }); }); IriSP._(_source.__keywords).each(function(kw) { _this.types.tag.serializer(kw, _source, _res); - }) + }); } _source.forEach(function(_list, _typename) { if (typeof _this.types[_typename] !== "undefined") {