aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage
diff options
context:
space:
mode:
authorKishore Subramanian2012-03-19 10:36:49 -0700
committerKishore Subramanian2012-03-19 10:39:46 -0700
commit9d364be255900e9bde02c4b254d145ec41fc78fb (patch)
tree2b61f27e38b006c8f4d3e33dfa4cc568c4266d4e /node_modules/montage
parenteb5cda3ce03b35c3335b91c34ead0cdf290b243e (diff)
downloadninja-9d364be255900e9bde02c4b254d145ec41fc78fb.tar.gz
Changes to the Demo
- Feed Reader now shows one entry at a time - Category dropdown removed form the Map. It is included as part of the example code - Changed the categories that do not return results
Diffstat (limited to 'node_modules/montage')
-rw-r--r--node_modules/montage/examples/feed-reader/images/47-fuel.pngbin0 -> 3091 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/80-shopping-cart.pngbin0 -> 2963 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/images/88-beer-mug.pngbin0 -> 3087 bytes
-rw-r--r--node_modules/montage/examples/feed-reader/main.reel/main.html26
-rw-r--r--node_modules/montage/examples/feed-reader/main.reel/main.js10
-rw-r--r--node_modules/montage/ui/feed-reader/feed-entry.reel/feed-entry.html1
-rw-r--r--node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.html26
-rw-r--r--node_modules/montage/ui/feed-reader/feed-reader.reel/feed-reader.js51
-rw-r--r--node_modules/montage/ui/map.reel/map.html31
-rw-r--r--node_modules/montage/ui/map.reel/map.js41
10 files changed, 125 insertions, 61 deletions
diff --git a/node_modules/montage/examples/feed-reader/images/47-fuel.png b/node_modules/montage/examples/feed-reader/images/47-fuel.png
new file mode 100644
index 00000000..617d7640
--- /dev/null
+++ b/node_modules/montage/examples/feed-reader/images/47-fuel.png
Binary files differ
diff --git a/node_modules/montage/examples/feed-reader/images/80-shopping-cart.png b/node_modules/montage/examples/feed-reader/images/80-shopping-cart.png
new file mode 100644
index 00000000..51a5f86f
--- /dev/null
+++ b/node_modules/montage/examples/feed-reader/images/80-shopping-cart.png
Binary files differ
diff --git a/node_modules/montage/examples/feed-reader/images/88-beer-mug.png b/node_modules/montage/examples/feed-reader/images/88-beer-mug.png
new file mode 100644
index 00000000..b0fdd99a
--- /dev/null
+++ b/node_modules/montage/examples/feed-reader/images/88-beer-mug.png
Binary files differ
diff --git a/node_modules/montage/examples/feed-reader/main.reel/main.html b/node_modules/montage/examples/feed-reader/main.reel/main.html
index 8ea9a79b..ef4fc92a 100644
--- a/node_modules/montage/examples/feed-reader/main.reel/main.html
+++ b/node_modules/montage/examples/feed-reader/main.reel/main.html
@@ -79,6 +79,13 @@
79 "element": {"#": "map"} 79 "element": {"#": "map"}
80 } 80 }
81 }, 81 },
82
83 "types": {
84 "prototype": "montage/ui/select-input.reel",
85 "properties": {
86 "element": {"#": "types"}
87 }
88 },
82 89
83 "owner": { 90 "owner": {
84 "module": "main.reel", 91 "module": "main.reel",
@@ -92,6 +99,10 @@
92 "mapCenter": { 99 "mapCenter": {
93 "boundObject": {"@": "mapCenter"}, 100 "boundObject": {"@": "mapCenter"},
94 "boundObjectPropertyPath": "value" 101 "boundObjectPropertyPath": "value"
102 },
103 "mapCategory": {
104 "boundObject": {"@": "types"},
105 "boundObjectPropertyPath": "value"
95 } 106 }
96 } 107 }
97 } 108 }
@@ -140,6 +151,10 @@
140 visibility: hidden; 151 visibility: hidden;
141 } 152 }
142 153
154 #map, #feed-reader {
155 margin-top: 10px;
156 }
157
143 158
144 </style> 159 </style>
145 160
@@ -168,6 +183,17 @@
168 <form> 183 <form>
169 Location: <input type="text" value="Paris, France" id="map-center" required /> 184 Location: <input type="text" value="Paris, France" id="map-center" required />
170 <input type="button" id="btn-map" class="btn primary" value="OK"></button> 185 <input type="button" id="btn-map" class="btn primary" value="OK"></button>
186 <div>
187 Show:
188 <select data-montage-id="types">
189 <option value=''>Select a Category</option>
190 <option value='grocery_or_supermarket'>Groceries/Supermarkets</option>
191 <option value='hospital'>Hospitals</option>
192 <option value='restaurant'>Restaurants</option>
193 <option value='bar'>Bars</option>
194 <option value='gas_station'>Gas Stations</option>
195 </select>
196 </div>
171 </form> 197 </form>
172 </div> 198 </div>
173 <div id="map">Map</div> 199 <div id="map">Map</div>
diff --git a/node_modules/montage/examples/feed-reader/main.reel/main.js b/node_modules/montage/examples/feed-reader/main.reel/main.js
index bea5f91a..06d8fdba 100644
--- a/node_modules/montage/examples/feed-reader/main.reel/main.js
+++ b/node_modules/montage/examples/feed-reader/main.reel/main.js
@@ -13,6 +13,16 @@ exports.Main = Montage.create(Component, {
13 distinct: true 13 distinct: true
14 }, 14 },
15 15
16 mapCategory: {
17 get: function() {
18 return this._mapCategory;
19 },
20 set: function(value) {
21 this._mapCategory = value;
22 this.map.category = value;
23 }
24 },
25
16 feedReader: {value: null}, 26 feedReader: {value: null},
17 27
18 map: {value: null}, 28 map: {value: null},
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
index 213b4602..6c3a5298 100644
--- 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
@@ -61,7 +61,6 @@
61 .feed-entry { 61 .feed-entry {
62 padding: 10px; 62 padding: 10px;
63 margin: 3px 0; 63 margin: 3px 0;
64 border: 1px solid #aaa;
65 } 64 }
66 .feed-entry h2 { 65 .feed-entry h2 {
67 font-size: 24px; 66 font-size: 24px;
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
index a3523001..646fd01e 100644
--- 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
@@ -53,7 +53,15 @@
53 "module": "montage/ui/feed-reader/feed-reader.reel", 53 "module": "montage/ui/feed-reader/feed-reader.reel",
54 "name": "FeedReader", 54 "name": "FeedReader",
55 "properties": { 55 "properties": {
56 "element": {"#": "feed-reader"} 56 "element": {"#": "feed-reader"},
57 "repetition": {"@": "repetition"}
58 },
59 "bindings": {
60 "items": {
61 "boundObject": {"@": "repetition"},
62 "boundObjectPropertyPath": "objects",
63 "oneway": true
64 }
57 } 65 }
58 } 66 }
59 67
@@ -61,8 +69,20 @@
61 </script> 69 </script>
62 70
63 <style> 71 <style>
64 .feed-reader { 72 div.feed-reader {
65 padding: 10px; 73 padding: 10px;
74 }
75
76 .feed-entry {
77 display: none;
78 }
79
80 .montage-hidden {
81 display: none;
82 }
83
84 .active {
85 display: block;
66 } 86 }
67 87
68 </style> 88 </style>
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
index 838a957d..d5c9ca17 100644
--- 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
@@ -40,7 +40,13 @@ exports.FeedReader = Montage.create(Component, {
40 this._fetchFeed(); 40 this._fetchFeed();
41 } 41 }
42 }, 42 },
43
44 // time in ms between slides
45 interval: {value: 3000, distinct: true},
46
47 repetition: {enumerable: false, value: null},
43 48
49 maxEntries: {value: 10, distinct: true},
44 entries: {value: null}, 50 entries: {value: null},
45 51
46 52
@@ -55,6 +61,51 @@ exports.FeedReader = Montage.create(Component, {
55 //Notifier.hide(); 61 //Notifier.hide();
56 } 62 }
57 }, 63 },
64
65
66 feedEntryTimer: {enumerable: false, value: null},
67 _items: {
68 value: null
69 },
70 items: {
71 get: function() {
72 return this._items;
73 },
74 set: function(value) {
75 this._items = value;
76 // reset the counter
77 console.log('got items');
78 this.activeIndex = 0;
79
80 if(this.feedEntryTimer) {
81