added a var to configure the num of seconds to display the tweet. tweet-widget
authorhamidouk
Fri, 18 Nov 2011 17:45:45 +0100
branchtweet-widget
changeset 282 1001234e5e6e
parent 281 7edd686a2b2a
child 283 39e6707ca72b
added a var to configure the num of seconds to display the tweet.
src/js/site.js
src/js/widgets/tweetsWidget.js
--- a/src/js/site.js	Fri Nov 18 16:35:31 2011 +0100
+++ b/src/js/site.js	Fri Nov 18 17:45:45 2011 +0100
@@ -22,7 +22,8 @@
   "PlayerWidget" : {},
   "AnnotationsWidget": {},
   "TweetsWidget" : {
-      default_profile_picture : "https://twimg0-a.akamaihd.net/sticky/default_profile_images/default_profile_3_bigger.png"
+      default_profile_picture : "https://twimg0-a.akamaihd.net/sticky/default_profile_images/default_profile_3_bigger.png",
+      tweet_display_period: 10000 // how long do we show a tweet ?
   }
 };
 
--- a/src/js/widgets/tweetsWidget.js	Fri Nov 18 16:35:31 2011 +0100
+++ b/src/js/widgets/tweetsWidget.js	Fri Nov 18 17:45:45 2011 +0100
@@ -37,7 +37,7 @@
   this.drawTweet(annotation);
 
   var time = this._Popcorn.currentTime();  
-  this._timeoutId = window.setTimeout(IriSP.wrap(this, this.clearPanel), 10000);
+  this._timeoutId = window.setTimeout(IriSP.wrap(this, this.clearPanel), IriSP.widgetsDefaults.TweetsWidget.tweet_display_period);
 };