From: Mohammed Buttu Date: Fri, 17 Jun 2011 15:48:56 +0000 (-0400) Subject: #516 Fixed code style X-Git-Tag: v0.7^2~32^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=774b5e899fed955c3a76d6a03e48bba706bd62b4;p=popcorn-js.git #516 Fixed code style --- diff --git a/plugins/flickr/popcorn.flickr.html b/plugins/flickr/popcorn.flickr.html index ca0e25d..31d2208 100755 --- a/plugins/flickr/popcorn.flickr.html +++ b/plugins/flickr/popcorn.flickr.html @@ -15,35 +15,27 @@ 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", diff --git a/plugins/flickr/popcorn.flickr.js b/plugins/flickr/popcorn.flickr.js index 5f37550..cf75545 100755 --- a/plugins/flickr/popcorn.flickr.js +++ b/plugins/flickr/popcorn.flickr.js @@ -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 @@ -46,19 +46,19 @@ _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(); }); @@ -146,7 +146,7 @@ * 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 ); diff --git a/plugins/flickr/popcorn.flickr.unit.js b/plugins/flickr/popcorn.flickr.unit.js index 7fc4531..4151b34 100755 --- a/plugins/flickr/popcorn.flickr.unit.js +++ b/plugins/flickr/popcorn.flickr.unit.js @@ -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",