From: Anna Sobiepanek Date: Wed, 26 Jan 2011 20:26:03 +0000 (-0500) Subject: initial work no tests [#294] X-Git-Tag: v0.3~1^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=dc61cc88e30a642f3b5c891214d06050f2ecb4fb;p=popcorn-js.git initial work no tests [#294] --- diff --git a/plugins/tagthisperson/popcorn.tagthisperson.html b/plugins/tagthisperson/popcorn.tagthisperson.html index 2394176..94821a7 100644 --- a/plugins/tagthisperson/popcorn.tagthisperson.html +++ b/plugins/tagthisperson/popcorn.tagthisperson.html @@ -14,6 +14,7 @@ start: 0, // seconds end: 10, // seconds person: 'Anna Sob', + image: 'http://newshour.s3.amazonaws.com/photos%2Fspeeches%2Fguests%2FRichardNSmith_thumbnail.jpg', target: 'tagdiv' } ) .tagthisperson({ diff --git a/plugins/tagthisperson/popcorn.tagthisperson.js b/plugins/tagthisperson/popcorn.tagthisperson.js index 2d46575..105ee0b 100644 --- a/plugins/tagthisperson/popcorn.tagthisperson.js +++ b/plugins/tagthisperson/popcorn.tagthisperson.js @@ -27,10 +27,11 @@ Popcorn.plugin( "tagthisperson" , (function(){ var peopleArray = []; + // one People object per options.target var People = function(){ this.name = ""; this.contains = {}; - this.toString = function(target) { + this.toString = function() { var r = []; for ( var j in this.contains) { if (this.contains.hasOwnProperty(j)) { @@ -80,7 +81,12 @@ * options variable */ start: function(event, options){ - options._p.contains[options.person] = options.person; + if ( options.image ) { + options._p.contains[options.person] = " " + options.person; + } else { + options._p.contains[options.person] = options.person; + } + //options._p.contains[options.person] = options.person; if (document.getElementById(options.target)) { document.getElementById(options.target).innerHTML = options._p.toString(); } diff --git a/plugins/twitter/popcorn.twitter.html b/plugins/twitter/popcorn.twitter.html index 689bb79..7ce859c 100644 --- a/plugins/twitter/popcorn.twitter.html +++ b/plugins/twitter/popcorn.twitter.html @@ -9,18 +9,103 @@