--- a/src/widgets/Tweet.js Wed Sep 19 14:59:35 2012 +0900
+++ b/src/widgets/Tweet.js Fri Sep 21 11:18:57 2012 +0900
@@ -25,6 +25,7 @@
"color" : "#05aae6"
}
],
+ annotation_type: "tweet",
pin_at_start: false
}
@@ -66,7 +67,6 @@
IriSP.Widgets.Tweet.prototype.draw = function() {
this.renderTemplate();
- this.onMdpEvent("Tweet.show","show");
this.pinned = this.pin_at_start;
var _this = this;
this.$.find(".Ldt-Tweet-Pin").click(function() {
@@ -84,10 +84,14 @@
_this.hide();
});
this.$.hide();
+ this.getWidgetAnnotations().forEach(function(_annotation) {
+ _annotation.on("click", function() {
+ _this.show(_annotation);
+ });
+ });
}
-IriSP.Widgets.Tweet.prototype.show = function(_id) {
- var _tweet = this.source.getElement(_id);
+IriSP.Widgets.Tweet.prototype.show = function(_tweet) {
if (typeof _tweet !== "undefined" && typeof _tweet.source !== "undefined") {
var _entities = [];
for (var _i = 0; _i < _tweet.source.entities.hashtags.length; _i++) {