fixed the option to specify an user. popcorn-port
authorhamidouk
Thu, 02 Feb 2012 15:30:39 +0100
branchpopcorn-port
changeset 764 628ae65defa7
parent 763 abaa61b81110
child 765 fdfd3c92ebac
fixed the option to specify an user.
src/js/site.js.templ
src/js/widgets/createAnnotationWidget.js
--- a/src/js/site.js.templ	Thu Feb 02 15:13:05 2012 +0100
+++ b/src/js/site.js.templ	Thu Feb 02 15:30:39 2012 +0100
@@ -112,6 +112,16 @@
   };
 };
 
+/*
+Override this if you want to change the info the player receives about the user.
+It's typically overrided in server-side templates with user-specific data.
+
+IriSP.user = {
+  "name" : "loic",
+  "avatar" : "http://a1.twimg.com/profile_images/39270812/loicempuria_normal.jpg"
+};
+*/
+
 IriSP.defaults.paths = {
 //  "imgs": "/tweetlive/res/metadataplayer/src/css/imgs"
   "imgs": "/mdp/src/css/imgs"
--- a/src/js/widgets/createAnnotationWidget.js	Thu Feb 02 15:13:05 2012 +0100
+++ b/src/js/widgets/createAnnotationWidget.js	Thu Feb 02 15:30:39 2012 +0100
@@ -31,7 +31,7 @@
                          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;
+    template_params["user_avatar"] = IriSP.user.avatar;
   
   var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template, 
                                            template_params);