diff -r eb8677d3a663 -r 5cd368dba1b9 src/widgets/Tweet.js
--- a/src/widgets/Tweet.js Wed Jun 20 14:45:30 2012 +0200
+++ b/src/widgets/Tweet.js Wed Jun 20 18:41:41 2012 +0200
@@ -24,7 +24,8 @@
"keywords" : [ "??" ],
"color" : "#05aae6"
}
- ]
+ ],
+ pin_at_start: false
}
IriSP.Widgets.Tweet.prototype.messages = {
@@ -34,8 +35,9 @@
keep_visible: "Garder visible",
dont_keep_visible: "Permettre la fermeture automatique",
close_widget: "Fermer l'affichage du tweet",
- original_time: "Heure d'envoi ",
- video_time: "Temps de la vidéo : "
+ original_time: "Heure d'envoi : ",
+ video_time: "Temps de la vidéo : ",
+ show_original: "Voir l'original"
},
"en": {
retweet: "Retweet",
@@ -44,25 +46,28 @@
dont_keep_visible: "Don't keep visible",
close_widget: "Close tweet display",
original_time: "Tweet sent at: ",
- video_time: "Video time: "
+ video_time: "Video time: ",
+ show_original: "Show original"
}
}
IriSP.Widgets.Tweet.prototype.template =
'
';
IriSP.Widgets.Tweet.prototype.draw = function() {
this.renderTemplate();
this.bindPopcorn("IriSP.Tweet.show","show");
- this.pinned = false;
+ this.pinned = this.pin_at_start;
var _this = this;
this.$.find(".Ldt-Tweet-Pin").click(function() {
_this.pinned = !_this.pinned;
@@ -158,10 +163,13 @@
_txt += _tweet.source.text.substring(_currentPos);
this.$.find(".Ldt-Tweet-Avatar").attr("src",_tweet.source.user.profile_image_url);
this.$.find(".Ldt-Tweet-ScreenName").html('@'+_tweet.source.user.screen_name);
- this.$.find(".Ldt-Tweet-ProfileLink").attr("href", "http://twitter.com/" + _tweet.source.user.screen_name);
+ this.$.find(".Ldt-Tweet-ProfileLink").attr("href", "https://twitter.com/" + _tweet.source.user.screen_name);
this.$.find(".Ldt-Tweet-FullName").html(_tweet.source.user.name);
this.$.find(".Ldt-Tweet-Contents").html(_txt);
this.$.find(".Ldt-Tweet-Time").html(this.l10n.original_time + new Date(_tweet.source.created_at).toLocaleTimeString() + " / " + this.l10n.video_time + _tweet.begin.toString());
+ this.$.find(".Ldt-Tweet-Retweet").attr("href", "https://twitter.com/intent/retweet?tweet_id=" + _tweet.source.id_str);
+ this.$.find(".Ldt-Tweet-Reply").attr("href", "https://twitter.com/intent/tweet?in_reply_to=" + _tweet.source.id_str);
+ this.$.find(".Ldt-Tweet-Original").attr("href", "https://twitter.com/" + _tweet.source.user.screen_name + "/status/" + _tweet.source.id_str);
this.player.popcorn.trigger("IriSP.Annotation.minimize");
this.$.slideDown();
this.cancelTimeout();