From: Daniel Hodgin Date: Sun, 27 Jun 2010 19:05:36 +0000 (-0400) Subject: merged in attribution and updated to make work with videomanager X-Git-Tag: v0.1~66 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=97ad1bd1c3afe1aa055ee94cc88696e93dc6a958;p=popcorn-js.git merged in attribution and updated to make work with videomanager --- 97ad1bd1c3afe1aa055ee94cc88696e93dc6a958 diff --cc index.html index 0cf08d1,1f0e85c..4ec9f90 --- a/index.html +++ b/index.html @@@ -39,24 -36,11 +39,25 @@@
+

-

+

++

In this video:

-
-
+
+
+
+

+

+
+
diff --cc popcorn.js index 67a9304,cccf022..35c628d --- a/popcorn.js +++ b/popcorn.js @@@ -212,89 -157,65 +212,147 @@@ this.onOut = function() { MapCommand.map.setCenter(new google.maps.LatLng(0, 0)); MapCommand.map.setZoom(0); + document.getElementById('mapinfo').innerHTML = ""; }; }; - - var AttributionCommand = function(name, params, text) { - VideoCommand.call(this, name, params, text); + + //////////////////////////////////////////////////////////////////////////// + // Twitter Command + //////////////////////////////////////////////////////////////////////////// + + var TwitterCommand = function(name, params, text, videoManager) { + VideoCommand.call(this, name, params, text, videoManager); + // Setup a default, hidden div to hold the feed + this.target = document.createElement('div'); + this.target.setAttribute('id', this.id); + document.getElementById(this.params.target).appendChild(this.target); + // Div is hidden by default + this.target.setAttribute('style', 'display:none'); + new TWTR.Widget({ + creator: true, + version: 2, + type: 'search', + id: this.target.getAttribute('id'), + search: this.params.source, + rpp: 30, + width: 250, + height: 200, + interval: 6000, + theme: { + shell: { + background: '#8ec1da', + color: '#ffffff' + }, + tweets: { + background: '#ffffff', + color: '#444444', + links: '#1985b5' + } + }, + features: { + loop: true, + timestamp: true, + avatars: true, + hashtags: true, + toptweets: true, + live: true, + scrollbar: false, + behavior: 'default' + } + }).render().start(); + + this.onIn = function() { + this.target.setAttribute('style', 'display:inline'); + }; + this.onOut = function() { + this.target.setAttribute('style', 'display:none'); + }; + this.preload = function() {}; // Probably going to need to preload this. + }; // http://twitter.com/celinecelines + + //////////////////////////////////////////////////////////////////////////// + // Footnote Command + //////////////////////////////////////////////////////////////////////////// + + var FootnoteCommand = function(name, params, text, videoManager) { + VideoCommand.call(this, name, params, text, videoManager); + this.onIn = function() { + //if the user specifies a target div for this in the xml use it + //otherwise make a new div + if( this.params.target ) { + document.getElementById( this.params.target ).innerHTML = this.text; + } else { + //this will be done later in ticket #46 (support default div) + //for this case i would think get the parent div of the