From 2e04af953463643791f6362bd8ef4c6ba190abfa Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 13:48:51 -0700 Subject: Squashed commit of the following: commit 2054551bfb01a0f4ca2e138b9d724835462d45cd Merge: 765c2da 616a853 Author: Valerio Virgillito Date: Wed Apr 18 13:48:21 2012 -0700 Merge branch 'refs/heads/master' into integration commit 765c2da8e1aa03550caf42b2bd5f367555ad2843 Author: Valerio Virgillito Date: Tue Apr 17 15:29:41 2012 -0700 updating the picasa carousel Signed-off-by: Valerio Virgillito commit 9484f1c82b81e27edf2dc0a1bcc1fa3b12077406 Merge: d27f2df cacb4a2 Author: Valerio Virgillito Date: Tue Apr 17 15:03:50 2012 -0700 Merge branch 'refs/heads/master' into integration commit d27f2df4d846064444263d7832d213535962abe7 Author: Valerio Virgillito Date: Wed Apr 11 10:39:36 2012 -0700 integrating new picasa carousel component Signed-off-by: Valerio Virgillito commit 6f98384c9ecbc8abe55ccfe1fc25a0c7ce22c493 Author: Valerio Virgillito Date: Tue Apr 10 14:33:00 2012 -0700 fixed the text area case issue Text area was renamed from TextArea to Textarea Signed-off-by: Valerio Virgillito commit 1e83e26652266136802bc7af930379c1ecd631a6 Author: Valerio Virgillito Date: Mon Apr 9 22:10:45 2012 -0700 integrating montage v0.8 into ninja. Signed-off-by: Valerio Virgillito Signed-off-by: Valerio Virgillito --- .../ui/picasa-carousel.reel/image.reel/image.html | 3 +- .../ui/picasa-carousel.reel/picasa-carousel.css | 15 +- .../ui/picasa-carousel.reel/picasa-carousel.html | 242 +++++++++++---------- .../ui/picasa-carousel.reel/picasa-carousel.js | 210 +++++++++--------- 4 files changed, 244 insertions(+), 226 deletions(-) (limited to 'node_modules/montage/ui/picasa-carousel.reel') diff --git a/node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html b/node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html index 3e88adc0..9590fce9 100644 --- a/node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html +++ b/node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html @@ -9,8 +9,7 @@ + + diff --git a/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js b/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js index bdc74c83..0fcbeb2d 100644 --- a/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js +++ b/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js @@ -15,10 +15,10 @@ var Montage = require("montage").Montage, @extends module:montage/ui/component.Component */ var PicasaCarousel = exports.PicasaCarousel = Montage.create(Component, /** @lends module:"montage/ui/toggle-switch.reel".ToggleSwitch# */ { - photoListController: { - enumerable: false, - value: null - }, + photoListController: { + enumerable: false, + value: null + }, flow: { value: null @@ -28,14 +28,12 @@ var PicasaCarousel = exports.PicasaCarousel = Montage.create(Component, /** @len value: 2300 }, - - _queryParameter: { enumerable: false, value: null }, - queryParameter: { + queryParameter: { get: function() { return this._queryParameter; }, @@ -43,111 +41,111 @@ var PicasaCarousel = exports.PicasaCarousel = Montage.create(Component, /** @len this._queryParameter = value; this.performSearch(); } - }, - - resultCount: { - enumerable: false, - value: 40 - }, - - prepareForDraw: { - enumerable: false, - value: function() { - // this.searchForm.identifier = "searchForm"; - // this.searchForm.addEventListener("submit", this, false); - } - }, - - _isSearching: { - value: false, - enumerable: false - }, - - isSearching: { - enumerable: false, - get: function() { - return this._isSearching; - }, - set: function(value) { - if (value === this._isSearching) { - return; - } - - this._isSearching = value; - this.needsDraw = true; - } - }, - - handleSearchFormSubmit: { - value: function(evt) { - evt.preventDefault(); - this.performSearch(); - } - }, - - performSearch: { - value: function() { - if (this.isSearching) { - console.log("already searching!") - return; - } - - this.isSearching = true; - this.searchResults = null; - - var base = "http://picasaweb.google.com/data/feed/base/all?visibility=public&alt=json&max-results=" + this.resultCount + "&kind=photo&prettyprint=true&imgmax=720u&q=" - // var base = "http://picasaweb.google.com/data/feed/base/featured?visibility=public&alt=json&max-results=" + this.resultCount + "&kind=photo&prettyprint=true" - var url = base + this.queryParameter; - - var req = new XMLHttpRequest(); - req.identifier = "searchRequest"; - req.open("GET", url); - req.addEventListener("load", this, false); - req.addEventListener("error", this, false); - req.send(); - - } - }, - - handleSearchRequestLoad: { - value: function(evt) { - var response = JSON.parse(evt.target.responseText), - previousOrigin = this.flow.origin; - this.searchResults = response.feed.entry; - if (this.flow.length === 0) { + }, + + resultCount: { + enumerable: false, + value: 1000 + }, + + prepareForDraw: { + enumerable: false, + value: function() { + // this.searchForm.identifier = "searchForm"; + // this.searchForm.addEventListener("submit", this, false); + } + }, + + _isSearching: { + value: false, + enumerable: false + }, + + isSearching: { + enumerable: false, + get: function() { + return this._isSearching; + }, + set: function(value) { + if (value === this._isSearching) { + return; + } + + this._isSearching = value; + this.needsDraw = true; + } + }, + + handleSearchFormSubmit: { + value: function(evt) { + evt.preventDefault(); + this.performSearch(); + } + }, + + performSearch: { + value: function() { + if (this.isSearching) { + console.log("already searching!") + return; + } + + this.isSearching = true; + this.searchResults = null; + + var base = "http://picasaweb.google.com/data/feed/base/all?visibility=public&alt=json&max-results=" + this.resultCount + "&kind=photo&prettyprint=true&imgmax=720u&q=" + // var base = "http://picasaweb.google.com/data/feed/base/featured?visibility=public&alt=json&max-results=" + this.resultCount + "&kind=photo&prettyprint=true" + var url = base + this.queryParameter; + + var req = new XMLHttpRequest(); + req.identifier = "searchRequest"; + req.open("GET", url); + req.addEventListener("load", this, false); + req.addEventListener("error", this, false); + req.send(); + + } + }, + + handleSearchRequestLoad: { + value: function(evt) { + var response = JSON.parse(evt.target.responseText); + + this.searchResults = response.feed.entry; + /*if (this.flow.length === 0) { this.flow.length = this.initialPosition; } if (previousOrigin === 0) { this.flow.origin = this.initialPosition; } else { this.flow.origin = previousOrigin; + }*/ + this.isSearching = false; + } + }, + + handleSearchRequestError: { + value: function(evt) { + console.error("handleSearchRequestError", evt); + this.isSearching = false; + } + }, + + searchResults: { + enumerable: false, + value: null + }, + + draw: { + value: function() { + + if (this.isSearching) { + this.element.classList.add("searching"); + } else { + this.element.classList.remove("searching"); } - this.isSearching = false; - } - }, - - handleSearchRequestError: { - value: function(evt) { - console.error("handleSearchRequestError", evt); - this.isSearching = false; - } - }, - - searchResults: { - enumerable: false, - value: null - }, - - draw: { - value: function() { - - if (this.isSearching) { - this.element.classList.add("searching"); - } else { - this.element.classList.remove("searching"); - } - - } - } + + } + } }); -- cgit v1.2.3