]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#63] href is optional, and removed the border
authorScottDowne <sdowne@learn.senecac.on.ca>
Thu, 23 Dec 2010 19:48:25 +0000 (14:48 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Thu, 23 Dec 2010 19:48:25 +0000 (14:48 -0500)
plugins/image/popcorn.image.html
plugins/image/popcorn.image.js

index 2ce3a7c93366bb2170fa6b1257447063ec1ad197..768659298ef5fe7dda816ea1b37997a5098eb2de 100644 (file)
@@ -19,7 +19,7 @@
       .image({
         start: 20, // seconds
         end: 45, // seconds
-        href: 'http://www.drumbeat.org/webmademovies',
+        // no href
         src: 'http://patriciabergeron.net/wp-content/uploads/web.made_.movie_marquee.gif',
         target: 'imagediv'
       } );
index 88de1d5e95d7f545c716ad15bbbee5325df2e5e6..454458c3c759474dc63d9fc199aa66eee6f03b4e 100644 (file)
@@ -4,8 +4,8 @@
   
   /**
    * Images popcorn plug-in 
-   * Creates an iframe showing a website specified by the user
-   * Options parameter will need a start, end, id, target and src.
+   * Shows an image element
+   * Options parameter will need a start, end, href, target and src.
    * Start is the time that you want this plug-in to execute
    * End is the time that you want this plug-in to stop executing 
    * href is the url of the destination of a link
 
         options.link = document.createElement( 'a' );
         options.link.style.display = "none"; // display none by default
-        options.link.href = options.href;
+        if ( options.href ) {
+          options.link.href = options.href;
+        }
         options.link.target = "_blank";
 
         document.getElementById( options.target ).appendChild( options.link ); // add the widget's div to the target div
 
         var img = document.createElement( 'img' );
         img.src = options.src;
+        img.style.borderStyle = "none"; // borders look really bad, if someone wants it they can put it on their div target
 
         options.link.appendChild( img );