# HG changeset patch # User hamidouk # Date 1321547653 -3600 # Node ID 41258988e132d2799b0963ea6441b601611ead90 # Parent 7fc5b863c53b1ee014f546e246eab9a5f11af3f1 made the tweetwidget appear and disappear. diff -r 7fc5b863c53b -r 41258988e132 src/js/widgets/tweetsWidget.js --- a/src/js/widgets/tweetsWidget.js Thu Nov 17 17:03:40 2011 +0100 +++ b/src/js/widgets/tweetsWidget.js Thu Nov 17 17:34:13 2011 +0100 @@ -8,13 +8,14 @@ IriSP.TweetsWidget.prototype = new IriSP.Widget(); -IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { - +IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { var title = annotation.content.title; var imageMarkup = Mustache.to_html("avatar", {src : annotation.content.img.src}); this.selector.find(".Ldt-tweetContents").text(title); this.selector.find(".Ldt-tweetAvatar").html(imageMarkup); + this.selector.show(50); + window.setTimeout(IriSP.wrap(this, function() { this.selector.hide(50) }), 10000); }; IriSP.TweetsWidget.prototype.draw = function() { @@ -22,7 +23,8 @@ var tweetMarkup = Mustache.to_html(IriSP.tweetWidget_template, {"share_template" : IriSP.share_template}); this.selector.append(tweetMarkup); - + this.selector.hide(); + this._Popcorn.listen("IriSP.PolemicTweet.click", IriSP.wrap(this, this.PolemicTweetClickHandler)); };