diff options
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 | }); | ||