equal
deleted
inserted
replaced
11 IriSP.TweetsWidget.prototype = new IriSP.Widget(); |
11 IriSP.TweetsWidget.prototype = new IriSP.Widget(); |
12 |
12 |
13 |
13 |
14 IriSP.TweetsWidget.prototype.drawTweet = function(annotation) { |
14 IriSP.TweetsWidget.prototype.drawTweet = function(annotation) { |
15 |
15 |
16 var title = annotation.content.title; |
16 var title = IriSP.formatTweet(annotation.content.title); |
17 var img = annotation.content.img.src; |
17 var img = annotation.content.img.src; |
18 if (typeof(img) === "undefined" || img === "" || img === "None") { |
18 if (typeof(img) === "undefined" || img === "" || img === "None") { |
19 img = IriSP.widgetsDefaults.TweetsWidget.default_profile_picture; |
19 img = IriSP.widgetsDefaults.TweetsWidget.default_profile_picture; |
20 } |
20 } |
21 |
21 |
22 var imageMarkup = Mustache.to_html("<img src='{{src}}' alt='avatar'></img>", |
22 var imageMarkup = Mustache.to_html("<img src='{{src}}' alt='avatar'></img>", |
23 {src : img}); |
23 {src : img}); |
24 |
24 |
25 this.selector.find(".Ldt-tweetContents").text(title); |
25 this.selector.find(".Ldt-tweetContents").html(title); |
26 this.selector.find(".Ldt-tweetAvatar").html(imageMarkup); |
26 this.selector.find(".Ldt-tweetAvatar").html(imageMarkup); |
27 this.selector.show("blind", 250); |
27 this.selector.show("blind", 250); |
28 }; |
28 }; |
29 |
29 |
30 IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { |
30 IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { |