equal
deleted
inserted
replaced
489 annotation.meta = meta; |
489 annotation.meta = meta; |
490 annotation.meta["id-ref"] = json.annotations[0]["type"]; |
490 annotation.meta["id-ref"] = json.annotations[0]["type"]; |
491 } else { |
491 } else { |
492 annotation.type = "cinecast:UserAnnotation"; |
492 annotation.type = "cinecast:UserAnnotation"; |
493 } |
493 } |
494 annotation.is_new = true; |
|
495 // everything is shared so there's no need to propagate the change |
494 // everything is shared so there's no need to propagate the change |
496 _this._serializer._data.annotations.push(annotation); |
495 var _an_ids = IriSP.underscore(this._serializer._data.annotations).map(function(_a) { |
|
496 return _a.id.toLowerCase(); |
|
497 }); |
|
498 if (_an_ids.indexOf(annotation.id.toLowerCase()) == -1) { |
|
499 _this._serializer._data.annotations.push(annotation); |
|
500 } |
|
501 |
497 _this._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation", annotation); |
502 _this._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation", annotation); |
498 this.selector.find(".Ldt-createAnnotation-Description").val("").trigger("js_mod"); |
503 this.selector.find(".Ldt-createAnnotation-Description").val("").trigger("js_mod"); |
499 callback(annotation); |
504 callback(annotation); |
500 }), |
505 }), |
501 error: |
506 error: |