added display over the tweeter's avatar. tweet-widget
authorhamidouk
Thu, 17 Nov 2011 17:00:17 +0100
branchtweet-widget
changeset 268 576cc32f0688
parent 267 f84013fb19dc
child 270 7fc5b863c53b
added display over the tweeter's avatar.
src/css/LdtPlayer.css
src/js/widgets/tweetsWidget.js
--- a/src/css/LdtPlayer.css	Thu Nov 17 16:51:19 2011 +0100
+++ b/src/css/LdtPlayer.css	Thu Nov 17 17:00:17 2011 +0100
@@ -240,10 +240,11 @@
       font-family: "Trebuchet MS", "Helvetica", "Arial",  "Verdana", "sans-serif";
       background-color:#eeeeee;    
       padding:5px;
+      overflow: auto;
     }
     
     .Ldt-tweetAvatar {
-    
+      float: left;
     }
     
     .Ldt-tweetContents {
--- a/src/js/widgets/tweetsWidget.js	Thu Nov 17 16:51:19 2011 +0100
+++ b/src/js/widgets/tweetsWidget.js	Thu Nov 17 17:00:17 2011 +0100
@@ -11,13 +11,10 @@
 IriSP.TweetsWidget.prototype.displayTweet = function(annotation) {
 
     var title = annotation.content.title;
-    var description = annotation.content.description;
-    var keywords =  "" // FIXME;
-    var begin = +annotation.begin;
-    var end = +annotation.end;
-    var duration = +this._serializer.currentMedia().meta["dc:duration"];
-
-    this.selector.find(".Ldt-tweetContents").text(title);   
+    var imageMarkup = Mustache.to_html("<img src='{{src}}' alt='avatar'></img>", 
+                                       {src : annotation.content.img.src});
+    this.selector.find(".Ldt-tweetContents").text(title);
+    this.selector.find(".Ldt-tweetAvatar").html(imageMarkup);
 };
 
 IriSP.TweetsWidget.prototype.draw = function() {