]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
#516 Fixed code style
authorMohammed Buttu <mohammedbuttu@gmail.com>
Fri, 17 Jun 2011 15:48:56 +0000 (11:48 -0400)
committerMohammed Buttu <mohammedbuttu@gmail.com>
Fri, 17 Jun 2011 15:48:56 +0000 (11:48 -0400)
plugins/flickr/popcorn.flickr.html
plugins/flickr/popcorn.flickr.js
plugins/flickr/popcorn.flickr.unit.js

index ca0e25dc99e5b2e99bd81f5475b5cf90a64d10e2..31d220859429dcc521867f587b229971468bf924 100755 (executable)
 
       var p = Popcorn( "#video" )
       .flickr({
-        // seconds
         start: 0,
-        // seconds
         end: 5,
         username: "AniaSob",
         apikey: "d1d249260dd1673ec8810c8ce5150ae1",
         target: "flickrdiv"
       })
       .flickr({
-        // seconds
         start: 5,
-        // seconds
         end: 15,
         userid: "35034346917@N01",
         target: "flickrdiv"
       })
       .flickr({
-        // seconds
         start: 20,
-        // seconds
         end: 30,
         tags: "georgia",
         numberofimages: 8,
         target: "flickrdiv"
       })
       .flickr({
-        // seconds
         start: 35,
-        // seconds
         end: 45,
         userid: "35034346917@N01",
         tags: "georgia",
index 5f37550ba69f4cd7e4e83dacbb7baf4634d03814..cf75545caa187fa0d8fa0a796540724c8f2eae2b 100755 (executable)
@@ -6,8 +6,8 @@
    * Appends a users Flickr images to an element on the page.
    * Options parameter will need a start, end, target and userid or username and api_key.
    * Optional parameters are numberofimages, height, width, padding, and border
-   * 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
+   * Start is the time that you want this plug-in to execute (in seconds)
+   * End is the time that you want this plug-in to stop executing (in seconds)
    * Userid is the id of who's Flickr images you wish to show
    * Tags is a mutually exclusive list of image descriptor tags
    * Username is the username of who's Flickr images you wish to show 
         _uri,
         _link,
         _image,
-        _count   = options.numberofimages || 4 ,
-        _height  = options.height || "50px",
-        _width   = options.width || "50px",
+        _count = options.numberofimages || 4 ,
+        _height = options.height || "50px",
+        _width = options.width || "50px",
         _padding = options.padding || "5px",
-        _border  = options.border || "0px",
+        _border = options.border || "0px",
         i;
 
     // create a new div this way anything in the target div is left intact
     // this is later populated with Flickr images
-    containerDiv               = document.createElement( "div" );
-    containerDiv.id            = "flickr"+ i;
-    containerDiv.style.width   = "100%";
-    containerDiv.style.height  = "100%";
+    containerDiv = document.createElement( "div" );
+    containerDiv.id = "flickr" + i;
+    containerDiv.style.width = "100%";
+    containerDiv.style.height = "100%";
     containerDiv.style.display = "none";
     i++;
     
@@ -75,7 +75,7 @@
 
         _uri  = "http://api.flickr.com/services/rest/?method=flickr.people.findByUsername&";        
         _uri += "username=" + options.username + "&api_key=" + options.apikey + "&format=json&jsoncallback=flickr";
-        Popcorn.xhr.getJSONP( _uri, function(data) {
+        Popcorn.xhr.getJSONP( _uri, function( data ) {
           _userid = data.user.nsid;
           getFlickrData();
         });
        * options variable
        */
       end: function( event, options ){      
-          containerDiv.style.display = "none";       
+        containerDiv.style.display = "none";       
       },
       _teardown: function( options ) {
         document.getElementById( options.target ) && document.getElementById( options.target ).removeChild( containerDiv );
index 7fc453109649f19906475cbca7f8860eba8ecf65..4151b341296f0c7635b373a3028e6990d2c2d348 100755 (executable)
@@ -23,9 +23,7 @@ test("Popcorn Flickr Plugin", function () {
   plus();
   
   popped.flickr({
-    // seconds
     start: 0,
-    // seconds
     end: 3,
     userid: "35034346917@N01",
     numberofimages: 1,
@@ -39,9 +37,7 @@ test("Popcorn Flickr Plugin", function () {
     target: "flickrdiv"
   })
   .flickr({
-    // seconds
     start: 8,
-    // seconds
     end: 10,
     username: "AniaSob",
     apikey: "d1d249260dd1673ec8810c8ce5150ae1",