src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 814 9abad8fe5207
parent 807 9f6c136ddc03
child 817 e9599ee285ab
--- a/src/js/widgets/createAnnotationWidget.js	Fri Feb 17 10:22:39 2012 +0100
+++ b/src/js/widgets/createAnnotationWidget.js	Fri Feb 17 10:56:28 2012 +0100
@@ -7,6 +7,8 @@
   this.polemics = IriSP.widgetsDefaults["createAnnotationWidget"].polemics;
   
   this.cinecast_version = IriSP.widgetsDefaults["createAnnotationWidget"].cinecast_version;
+  this.api_endpoint_template = IriSP.widgetsDefaults["createAnnotationWidget"].api_endpoint_template;
+  
   this.ids = {}; /* a dictionnary linking buttons ids to keywords */
   
   /* variables to save the current position of the slicer */
@@ -410,8 +412,8 @@
   var project_id = this._serializer._data.meta.id;
   
   //TODO: extract magic url
-  var url = Mustache.to_html("{{platf_url}}/ldtplatform/api/ldt/annotations/{{id}}.json",
-                              {platf_url: IriSP.platform_url, id: project_id});
+  var url = Mustache.to_html(this.api_endpoint_template,
+                              {id: project_id});
                           
   IriSP.jQuery.ajax({
       url: url,