From dc61cc88e30a642f3b5c891214d06050f2ecb4fb Mon Sep 17 00:00:00 2001 From: Anna Sobiepanek Date: Wed, 26 Jan 2011 15:26:03 -0500 Subject: [PATCH] initial work no tests [#294] --- .../tagthisperson/popcorn.tagthisperson.html | 1 + .../tagthisperson/popcorn.tagthisperson.js | 10 +- plugins/twitter/popcorn.twitter.html | 95 ++++++++++++++++++- 3 files changed, 99 insertions(+), 7 deletions(-) diff --git a/plugins/tagthisperson/popcorn.tagthisperson.html b/plugins/tagthisperson/popcorn.tagthisperson.html index 23941761..94821a76 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 2d46575b..105ee0bd 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 689bb796..7ce859c0 100644 --- a/plugins/twitter/popcorn.twitter.html +++ b/plugins/twitter/popcorn.twitter.html @@ -9,18 +9,103 @@