equal
deleted
inserted
replaced
8 |
8 |
9 IriSP.TweetsWidget.prototype = new IriSP.Widget(); |
9 IriSP.TweetsWidget.prototype = new IriSP.Widget(); |
10 |
10 |
11 IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { |
11 IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { |
12 var title = annotation.content.title; |
12 var title = annotation.content.title; |
|
13 var img = annotation.content.img.src; |
|
14 if (typeof(img) === "undefined" || img === "" || img === "None") { |
|
15 img = IriSP.widgetsDefaults.TweetsWidget.default_profile_picture; |
|
16 } |
|
17 |
13 var imageMarkup = Mustache.to_html("<img src='{{src}}' alt='avatar'></img>", |
18 var imageMarkup = Mustache.to_html("<img src='{{src}}' alt='avatar'></img>", |
14 {src : annotation.content.img.src}); |
19 {src : img}); |
|
20 |
15 this.selector.find(".Ldt-tweetContents").text(title); |
21 this.selector.find(".Ldt-tweetContents").text(title); |
16 this.selector.find(".Ldt-tweetAvatar").html(imageMarkup); |
22 this.selector.find(".Ldt-tweetAvatar").html(imageMarkup); |
17 this.selector.show(50); |
23 this.selector.show(50); |
18 window.setTimeout(IriSP.wrap(this, function() { this.selector.hide(50) }), 10000); |
24 window.setTimeout(IriSP.wrap(this, function() { this.selector.hide(50) }), 10000); |
19 }; |
25 }; |