diff options
author | Benoit Marchant | 2012-03-17 17:41:47 -0700 |
---|---|---|
committer | François Frisch | 2012-03-17 17:41:47 -0700 |
commit | 28a7a71d2962158cab34f50627f2d22540c29eab (patch) | |
tree | dab3e0682ee3b55e74fda1f582e91d3f7937f7ef /node_modules/montage/ui/google | |
parent | bcddcf118d4ce93e8a2519ed455c6e25a701ce74 (diff) | |
download | ninja-28a7a71d2962158cab34f50627f2d22540c29eab.tar.gz |
Added a new picasa-carousel component as well as an example using it
Diffstat (limited to 'node_modules/montage/ui/google')
5 files changed, 406 insertions, 0 deletions
diff --git a/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html new file mode 100644 index 00000000..e3d9c7a2 --- /dev/null +++ b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.html | |||
@@ -0,0 +1,37 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html> | ||
8 | <head> | ||
9 | <script type="text/montage-serialization"> | ||
10 | { | ||
11 | "owner": { | ||
12 | "module": "montage/ui/google/picasa-carousel.reel/image.reel", | ||
13 | "name": "Image", | ||
14 | "properties": { | ||
15 | "element": {"#": "Image"} | ||
16 | } | ||
17 | } | ||
18 | } | ||
19 | </script> | ||
20 | </head> | ||
21 | <style> | ||
22 | .Image { | ||
23 | /* | ||
24 | margin-top: -160px; | ||
25 | margin-left: -160px; | ||
26 | */ | ||
27 | width: 320px; | ||
28 | height: 320px; | ||
29 | border-radius: 18px; | ||
30 | background-repeat: no-repeat; | ||
31 | background-size: cover; | ||
32 | } | ||
33 | </style> | ||
34 | <body> | ||
35 | <div id="Image" class="Image"></div> | ||
36 | </body> | ||
37 | </html> | ||
diff --git a/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js new file mode 100644 index 00000000..0bced41b --- /dev/null +++ b/node_modules/montage/ui/google/picasa-carousel.reel/image.reel/image.js | |||
@@ -0,0 +1,20 @@ | |||
1 | var Montage = require("montage").Montage, | ||
2 | Component = require("ui/component").Component; | ||
3 | |||
4 | var Image = exports.Image = Montage.create(Component, { | ||
5 | |||
6 | _src: {value: null}, | ||
7 | |||
8 | src: { | ||
9 | set: function(value) { | ||
10 | this._src = value; | ||
11 | this.needsDraw = true; | ||
12 | } | ||
13 | }, | ||
14 | |||
15 | draw: { | ||
16 | value: function() { | ||
17 | this._element.style.backgroundImage = "url(" + this._src + ")"; | ||
18 | } | ||
19 | } | ||
20 | }); | ||
diff --git a/node_modules/montage/ui/google/picasa-carousel.reel/picasa-carousel.css b/node_modules/montage/ui/google/picasa-carousel.reel/picasa-carousel.css new file mode 100755 index 00000000..cab6d1bb --- /dev/null +++ b/node_modules/montage/ui/google/picasa-carousel.reel/picasa-carousel.css | |||
@@ -0,0 +1,44 @@ | |||
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 | .montage-google-picasa-carousel { | ||
7 | width: 100%; | ||
8 | height: 100%; | ||
9 | display: -webkit-box; | ||
10 | -webkit-box-pack: center; | ||
11 | -webkit-box-align: center; | ||
12 | display: -moz-box; | ||
13 | -moz-box-pack: center; | ||
14 | -moz-box-align: center; | ||
15 | display: -ms-box; | ||
16 | -ms-box-pack: center; | ||
17 | -ms-box-align: center; | ||
18 | display: box; | ||
19 | box-pack: center; | ||
20 | box-align: center; | ||
21 | |||
22 | } | ||
23 | |||
24 | .montage-google-picasa-carousel .flow { | ||
25 | width: 100%; | ||
26 | height: 100%; | ||
27 | /* top: 0; | ||
28 | left: 0; | ||
29 | right: 0; | ||
30 | bottom: 0; | ||
31 | */ -webkit-perspective: 800px; | ||
32 | background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#bbb)); | ||
33 | } | ||
34 | .image { | ||
35 | position: absolute; | ||
36 | /* -top: 50%; | ||
37 | */ -webkit-box-shadow: 0 0 35px rgba(0,0,0,.5); | ||
38 | } | ||
39 | |||
40 | .montage-google-picasa-carousel .flow .montage-flow-repetition { | ||
41 | margin: 10% 0; | ||
42 | |||
43 | } | ||
44 | </style> | ||
diff --git a/node_modules/montage/ui/google/picasa-carousel.reel/picasa-carousel.html b/node_modules/montage/ui/google/picasa-carousel.reel/picasa-carousel.html new file mode 100755 index 00000000..73ccf076 --- /dev/null +++ b/node_modules/montage/ui/google/picasa-carousel.reel/picasa-carousel.html | |||
@@ -0,0 +1,181 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html> | ||
8 | <head> | ||
9 | <title></title> | ||
10 | <link rel="stylesheet" type="text/css" href="picasa-carousel.css"> | ||
11 | |||
12 | <script type="text/montage-serialization"> | ||
13 | { | ||
14 | "owner": { | ||
15 | "prototype": "montage/ui/google/picasa-carousel.reel", | ||
16 | "properties": { | ||
17 | "element": {"#": "montage-google-picasa-carousel"}, | ||
18 | "searchResultsList": {"@": "searchResultsList"} | ||
19 | } | ||
20 | }, | ||
21 | "searchResultsController": { | ||
22 | "module": "montage/ui/controller/array-controller", | ||
23 | "name": "ArrayController", | ||
24 | "bindings": { | ||
25 | "content": { | ||
26 | "boundObject": {"@": "owner"}, | ||
27 | "boundObjectPropertyPath": "searchResults" | ||
28 | } | ||
29 | } | ||
30 | }, | ||
31 | "image1": { | ||
32 | "prototype": "montage/ui/google/picasa-carousel.reel/image.reel", | ||
33 | "properties": { | ||
34 | "element": {"#": "image"} | ||
35 | }, | ||
36 | "bindings": { | ||
37 | "src": { | ||
38 | "boundObject": {"@": "flow1"}, | ||
39 | "boundObjectPropertyPath": "objectAtCurrentIteration.media$group.media$thumbnail.2.url", | ||
40 | "oneway": true | ||
41 | } | ||
42 | } | ||
43 | }, | ||
44 | "translateComposer1": { | ||
45 | "module": "montage/ui/composer/translate-composer", | ||
46 | "name": "TranslateComposer", | ||
47 | "properties": { | ||
48 | "component": {"@": "flow1"} | ||
49 | }, | ||
50 | "bindings": { | ||
51 | "maxTranslateX": { | ||
52 | "boundObject": {"@": "flow1"}, | ||
53 | "boundObjectPropertyPath": "length", | ||
54 | "oneway": true | ||
55 | }, | ||
56 | "translateX": { | ||
57 | "boundObject": {"@": "flow1"}, | ||
58 | "boundObjectPropertyPath": "origin" | ||
59 | } | ||
60 | } | ||
61 | }, | ||
62 | "nearest": { | ||
63 | "module": "montage/ui/nearest-neighbor-component-search", | ||
64 | "name": "NearestNeighborComponentSearch", | ||
65 | "bindings": { | ||
66 | "componentList": { | ||
67 | "boundObject": {"@": "flow1"}, | ||
68 | "boundObjectPropertyPath": "_repetitionComponents", | ||
69 | "oneway": true | ||
70 | }, | ||
71 | "pointerPosition": { | ||
72 | "boundObject": {"@": "translateComposer1"}, | ||
73 | "boundObjectPropertyPath": "pointerStartEventPosition", | ||
74 | "oneway": true | ||
75 | } | ||
76 | } | ||
77 | }, | ||
78 | "flow1": { | ||
79 | "module": "montage/ui/flow.reel", | ||
80 | "name": "Flow", | ||
81 | "properties": { | ||
82 | "element": {"#": "flow"}, | ||
83 | "cameraRotationAxisX": 1, | ||
84 | "cameraRotationAxisY": 0, | ||
85 | "cameraRotationAxisZ": 0, | ||