src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 840 ac66e2240e1e
parent 838 03b03865eb9b
child 841 8da49ff273e0
equal deleted inserted replaced
839:4357aac4eb19 840:ac66e2240e1e
   413       contentType: 'application/json',
   413       contentType: 'application/json',
   414       data: jsonString,               
   414       data: jsonString,               
   415       //dataType: 'json',
   415       //dataType: 'json',
   416       success: IriSP.wrap(this, function(json, textStatus, XMLHttpRequest) {                   
   416       success: IriSP.wrap(this, function(json, textStatus, XMLHttpRequest) {                   
   417                     /* add the annotation to the annotation and tell the world */
   417                     /* add the annotation to the annotation and tell the world */
   418                     if (this.cinecast_version) {
   418                     var annotation = json.annotations[0];
   419                         var annotation = json.annotations[0];
   419                     
   420                     } else {
   420                     if (!this.cinecast_version) {
   421                     /* if the media doesn't have a contributions line, we need to add one */
   421                     /* if the media doesn't have a contributions line, we need to add one */
   422                         if (typeof(this._serializer.getContributions()) === "undefined") {
   422                         if (typeof(this._serializer.getContributions()) === "undefined") {
   423                           /* set up a basic view */
   423                           /* set up a basic view */
   424                           var tmp_view = {"dc:contributor": "perso", "dc:creator": "perso", "dc:title": "Contributions",
   424                           var tmp_view = {"dc:contributor": "perso", "dc:creator": "perso", "dc:title": "Contributions",
   425                                           "id": json.annotations[0].type}
   425                                           "id": json.annotations[0].type}