if the platform has defined an user avatar, use it when submitting the annotation. popcorn-port
authorhamidouk
Thu, 02 Feb 2012 15:12:51 +0100
branchpopcorn-port
changeset 762 5497895a3ddb
parent 761 69d80dd9c9d8
child 763 abaa61b81110
if the platform has defined an user avatar, use it when submitting the annotation.
src/js/widgets/createAnnotationWidget.js
--- a/src/js/widgets/createAnnotationWidget.js	Thu Feb 02 14:52:33 2012 +0100
+++ b/src/js/widgets/createAnnotationWidget.js	Thu Feb 02 15:12:51 2012 +0100
@@ -27,10 +27,14 @@
 
 IriSP.createAnnotationWidget.prototype.draw = function() {
   var _this = this;
-
+  var template_params = {cinecast_version: this.cinecast_version, 
+                         polemic_mode: this.polemic_mode};
+                         
+  if (!IriSP.null_or_undefined(IriSP.user) && !IriSP.null_or_undefined(IriSP.user.avatar))
+    template_params["avatar"] = IriSP.user.avatar;
+  
   var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template, 
-                                           {cinecast_version: this.cinecast_version, 
-                                            polemic_mode: this.polemic_mode});
+                                           template_params);
   
 	this.selector.append(annotationMarkup);