diff options
author | François Frisch | 2012-03-17 11:21:22 -0700 |
---|---|---|
committer | François Frisch | 2012-03-17 11:21:22 -0700 |
commit | 1d0efc758bc9404eebbc8b8d592de9dbb329899e (patch) | |
tree | f9d21f8e03ffe919b8827b0aa2a4c4eb7b784c95 /node_modules/montage/ui/feed-reader | |
parent | 9b8a24a7360416d5750828c9580e33dd336ff882 (diff) | |
download | ninja-1d0efc758bc9404eebbc8b8d592de9dbb329899e.tar.gz |
Adding feed reader and map
Diffstat (limited to 'node_modules/montage/ui/feed-reader')
4 files changed, 268 insertions, 0 deletions
diff --git a/node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.html b/node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.html new file mode 100644 index 00000000..213b4602 --- /dev/null +++ b/node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.html | |||
@@ -0,0 +1,90 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
5 | <title>Feed Entry</title> | ||
6 | <script type="text/montage-serialization"> | ||
7 | { | ||
8 | "title": { | ||
9 | "module": "montage/ui/dynamic-text.reel", | ||
10 | "name": "DynamicText", | ||
11 | "properties": { | ||
12 | "element": {"#": "entry-title"} | ||
13 | }, | ||
14 | "bindings": { | ||
15 | "value": { | ||
16 | "boundObject": {"@": "owner"}, | ||
17 | "boundObjectPropertyPath": "entry.title", | ||
18 | "oneway": true | ||
19 | } | ||
20 | } | ||
21 | }, | ||
22 | "entryLink": { | ||
23 | "module": "montage/ui/anchor.reel", | ||
24 | "name": "Anchor", | ||
25 | "properties": { | ||
26 | "element": {"#": "entry-url"} | ||
27 | }, | ||
28 | "bindings": { | ||
29 | "href": { | ||
30 | "boundObject": {"@": "owner"}, | ||
31 | "boundObjectPropertyPath": "entry.link", | ||
32 | "oneway": true | ||
33 | } | ||
34 | } | ||
35 | }, | ||
36 | "description": { | ||
37 | "module": "montage/ui/dynamic-text.reel", | ||
38 | "name": "DynamicText", | ||
39 | "properties": { | ||
40 | "element": {"#": "entry-description"} | ||
41 | }, | ||
42 | "bindings": { | ||
43 | "value": { | ||
44 | "boundObject": {"@": "owner"}, | ||
45 | "boundObjectPropertyPath": "entry.contentSnippet", | ||
46 | "oneway": true | ||
47 | } | ||
48 | } | ||
49 | }, | ||
50 | "owner": { | ||
51 | "module": "montage/ui/feed-reader/feed-entry.reel", | ||
52 | "name": "FeedEntry", | ||
53 | "properties": { | ||
54 | "element": {"#": "feed-entry"} | ||
55 | } | ||
56 | } | ||
57 | } | ||
58 | </script> | ||
59 | |||
60 | <style> | ||
61 | .feed-entry { | ||
62 | padding: 10px; | ||
63 | margin: 3px 0; | ||
64 | border: 1px solid #aaa; | ||
65 | } | ||
66 | .feed-entry h2 { | ||
67 | font-size: 24px; | ||
68 | line-height: 24px; | ||
69 | margin-bottom: 12px; | ||
70 | } | ||
71 | .feed-entry .entry-title { | ||
72 | color: #404040; | ||
73 | font-weight: bold; | ||
74 | } | ||
75 | .feed-entry .entry-url { | ||
76 | text-decoration: none; | ||
77 | } | ||
78 | </style> | ||
79 | |||
80 | |||
81 | </head> | ||
82 | <body> | ||
83 | <div class="feed-entry" id="feed-entry"> | ||
84 | |||
85 | <a target="_blank" id="entry-url" class="entry-url"><h2 id="entry-title" class="entry-title"></h2></a> | ||
86 | <p id="entry-description" class="entry-description"></p> | ||
87 | </div> | ||
88 | |||
89 | </body> | ||
90 | </html> | ||
diff --git a/node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.js b/node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.js new file mode 100644 index 00000000..3d97eec7 --- /dev/null +++ b/node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.js | |||
@@ -0,0 +1,13 @@ | |||
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").Montage, | ||
7 | Component = require("ui/component").Component; | ||
8 | |||
9 | exports.FeedEntry = Montage.create(Component, { | ||
10 | |||
11 | entry: {value: null} | ||
12 | |||
13 | }); | ||
diff --git a/node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.html b/node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.html new file mode 100644 index 00000000..a3523001 --- /dev/null +++ b/node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.html | |||
@@ -0,0 +1,83 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
5 | <title>Feed Reader</title> | ||
6 | |||
7 | <script type="text/javascript" src="https://www.google.com/jsapi?callback=initGoogleAPI"></script> | ||
8 | |||
9 | <script type="text/montage-serialization"> | ||
10 | { | ||
11 | "entriesController": { | ||
12 | "name": "ArrayController", | ||
13 | "module": "montage/ui/controller/array-controller", | ||
14 | "properties": { | ||
15 | "selectObjectsOnAddition": true, | ||
16 | "automaticallyOrganizeObjects": true | ||
17 | }, | ||
18 | "bindings": { | ||
19 | "content": { | ||
20 | "boundObject": {"@": "owner"}, | ||
21 | "boundObjectPropertyPath": "entries", | ||
22 | "oneway": true | ||
23 | } | ||
24 | } | ||
25 | }, | ||
26 | |||
27 | "repetition": { | ||
28 | "module": "montage/ui/repetition.reel", | ||
29 | "name": "Repetition", | ||
30 | "properties": { | ||
31 | "element": {"#": "entries"}, | ||
32 | "contentController": {"@": "entriesController"}, | ||
33 | "isSelectionEnabled": true, | ||
34 | "orientation": "vertical" | ||
35 | } | ||
36 | }, | ||
37 | "feedEntry": { | ||
38 | "module": "montage/ui/feed-reader/feed-entry.reel", | ||
39 | "name": "FeedEntry", | ||
40 | "properties": { | ||
41 | "element": {"#": "feed-entry"} | ||
42 | }, | ||
43 | "bindings": { | ||
44 | "entry": { | ||
45 | "boundObject": {"@": "repetition"}, | ||
46 | "boundObjectPropertyPath": "objectAtCurrentIteration", | ||
47 | "oneway": true | ||
48 | } | ||
49 | } | ||
50 | }, | ||
51 | |||
52 | "owner": { | ||
53 | "module": "montage/ui/feed-reader/feed-reader.reel", | ||
54 | "name": "FeedReader", | ||
55 | "properties": { | ||
56 | "element": {"#": "feed-reader"} | ||
57 | } | ||
58 | } | ||
59 | |||
60 | } | ||
61 | </script> | ||
62 | |||
63 | <style> | ||
64 | .feed-reader { | ||
65 | padding: 10px; | ||
66 | } | ||
67 | |||
68 | </style> | ||
69 | |||
70 | |||
71 | </head> | ||
72 | <body> | ||
73 | <div class="feed-reader" id="feed-reader"> | ||
74 | |||
75 | <div id="entries"> | ||
76 | <div class="feed-entry" id="feed-entry"></div> | ||
77 | </div> | ||
78 | |||
79 | |||
80 | </div> | ||
81 | |||
82 | </body> | ||
83 | </html> | ||
diff --git a/node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.js b/node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.js new file mode 100644 index 00000000..838a957d --- /dev/null +++ b/node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.js | |||
@@ -0,0 +1,82 @@ | |||
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").Montage, | ||
7 | Component = require("ui/component").Component; | ||
8 | //Notifier = require("ui/popup/notifier.reel").Notifier; | ||
9 | |||
10 | exports.FeedReader = Montage.create(Component, { | ||