diff options
author | Jose Antonio Marquez | 2012-03-18 16:14:34 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-18 16:14:34 -0700 |
commit | 06a790e0f830d01539dc9e80c90e2bcdabaa666b (patch) | |
tree | 474f3f1e0ea147b0400ff8528e1c33566179b211 /node_modules/montage/examples/feed-reader/main.reel/main.js | |
parent | fda7b595c96d99177fdd93de8da9030348a3f8fb (diff) | |
parent | 3056d540f32bb24927d06bfc516240cc6a0001f8 (diff) | |
download | ninja-06a790e0f830d01539dc9e80c90e2bcdabaa666b.tar.gz |
Merge branch 'refs/heads/francoisfrisch-Ninja-Internal' into FileIO-Montage-Components
Diffstat (limited to 'node_modules/montage/examples/feed-reader/main.reel/main.js')
-rw-r--r-- | node_modules/montage/examples/feed-reader/main.reel/main.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/node_modules/montage/examples/feed-reader/main.reel/main.js b/node_modules/montage/examples/feed-reader/main.reel/main.js new file mode 100644 index 00000000..bea5f91a --- /dev/null +++ b/node_modules/montage/examples/feed-reader/main.reel/main.js | |||
@@ -0,0 +1,45 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | var Montage = require("montage/core/core").Montage, | ||
7 | Component = require("montage/ui/component").Component; | ||
8 | |||
9 | exports.Main = Montage.create(Component, { | ||
10 | |||
11 | feedURL: { | ||
12 | value: 'http://rss.cnn.com/rss/cnn_mostpopular.rss', | ||
13 | distinct: true | ||
14 | }, | ||
15 | |||
16 | feedReader: {value: null}, | ||
17 | |||
18 | map: {value: null}, | ||
19 | |||
20 | mapCenter: {value: null}, | ||
21 | |||
22 | handleGoAction: { | ||
23 | value: function(event) { | ||
24 | event.preventDefault(); | ||
25 | this.feedReader.feedURL = this.feedURL; | ||
26 | |||
27 | } | ||
28 | }, | ||
29 | |||
30 | handleMapButtonAction: { | ||
31 | value: function(event) { | ||
32 | event.preventDefault(); | ||
33 | this.map.center = this.mapCenter; | ||
34 | } | ||
35 | }, | ||
36 | |||
37 | draw: { | ||
38 | value: function() { | ||
39 | if(this.mapCenter != null) { | ||
40 | this.map.center = this.mapCenter; | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | }); | ||