diff options
author | Jonathan Duran | 2012-06-05 08:42:53 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-05 08:42:53 -0700 |
commit | bd2c28100f347afc10243c80b8a288746370eee2 (patch) | |
tree | db507fe0fdbe8e6f98f7d0f022b29c8d5942b4f7 /node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js | |
parent | 121d0e616f48aa7cd048763554089c20a1883d7a (diff) | |
parent | c1ec69879028220b0c3f11ad6e24035bf527802c (diff) | |
download | ninja-bd2c28100f347afc10243c80b8a288746370eee2.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/controllers/elements/element-controller.js
js/panels/Timeline/Layer.reel/Layer.js
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js')
-rw-r--r-- | node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js index 47a831eb..c066220e 100644 --- a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js +++ b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js | |||
@@ -8,6 +8,10 @@ var Montage = require("montage").Montage, | |||
8 | 8 | ||
9 | exports.FeedReader = Montage.create(Component, { | 9 | exports.FeedReader = Montage.create(Component, { |
10 | 10 | ||
11 | _apiLoaded: { | ||
12 | value: false | ||
13 | }, | ||
14 | |||
11 | didCreate: { | 15 | didCreate: { |
12 | value: function() { | 16 | value: function() { |
13 | var self = this; | 17 | var self = this; |
@@ -17,6 +21,8 @@ exports.FeedReader = Montage.create(Component, { | |||
17 | google.load("feeds", "1", { | 21 | google.load("feeds", "1", { |
18 | callback: function() { | 22 | callback: function() { |
19 | console.log('google feeds api loaded'); | 23 | console.log('google feeds api loaded'); |
24 | self._apiLoaded = true; | ||
25 | self.feedURL = self._feedURL; | ||
20 | self.needsDraw = true; | 26 | self.needsDraw = true; |
21 | window.initGoogleAPI = null; | 27 | window.initGoogleAPI = null; |
22 | } | 28 | } |
@@ -30,13 +36,16 @@ exports.FeedReader = Montage.create(Component, { | |||
30 | 36 | ||
31 | _feedURL: {value: null}, | 37 | _feedURL: {value: null}, |
32 | feedURL: { | 38 | feedURL: { |
39 | serializable: true, | ||
33 | get: function() { | 40 | get: function() { |
34 | return this._feedURL; | 41 | return this._feedURL; |
35 | }, | 42 | }, |
36 | set: function(value) { | 43 | set: function(value) { |
37 | this._feedURL = value; | 44 | this._feedURL = value; |
38 | // execute the search and get the entries | 45 | // execute the search and get the entries |
39 | this._fetchFeed(); | 46 | if (this._apiLoaded) { |
47 | this._fetchFeed(); | ||
48 | } | ||
40 | } | 49 | } |
41 | }, | 50 | }, |
42 | 51 | ||
@@ -49,6 +58,7 @@ exports.FeedReader = Montage.create(Component, { | |||
49 | 58 | ||
50 | _feedDisplayMode: {value: null}, | 59 | _feedDisplayMode: {value: null}, |
51 | feedDisplayMode: { | 60 | feedDisplayMode: { |
61 | serializable: true, | ||
52 | get: function() { | 62 | get: function() { |
53 | return this._feedDisplayMode; | 63 | return this._feedDisplayMode; |
54 | }, | 64 | }, |
@@ -107,7 +117,7 @@ exports.FeedReader = Montage.create(Component, { | |||
107 | self.addEntryAnimation(); | 117 | self.addEntryAnimation(); |
108 | self.entries = result.feed.entries; | 118 | self.entries = result.feed.entries; |
109 | self.activeIndex = 0; | 119 | self.activeIndex = 0; |
110 | 120 | ||
111 | } | 121 | } |
112 | 122 | ||
113 | 123 | ||