diff options
Diffstat (limited to 'node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel')
3 files changed, 118 insertions, 0 deletions
diff --git a/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.css b/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.css new file mode 100755 index 00000000..82b04cf9 --- /dev/null +++ b/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.css | |||
@@ -0,0 +1,8 @@ | |||
1 | .montage-google-picasa-carousel, [data-montage-id="montage-google-picasa-carousel"] { | ||
2 | width: 800px; | ||
3 | height: 400px; | ||
4 | -webkit-perspective: 800px; | ||
5 | background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#bbb)); | ||
6 | } | ||
7 | |||
8 | |||
diff --git a/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.html b/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.html new file mode 100755 index 00000000..177eb068 --- /dev/null +++ b/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.html | |||
@@ -0,0 +1,75 @@ | |||
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 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
10 | <title>Main Component</title> | ||
11 | <link rel="stylesheet" type="text/css" href="main.css"> | ||
12 | |||
13 | |||
14 | <script type="text/montage-serialization"> | ||
15 | { | ||
16 | "owner": { | ||
17 | "module": "main.reel", | ||
18 | "name": "Main", | ||
19 | "properties": { | ||
20 | "element": {"#": "main"}, | ||
21 | "picasaCarousel": {"@":"picasa-carousel"}, | ||
22 | "searchForm": {"#":"searchForm"} | ||
23 | } | ||
24 | }, | ||
25 | |||
26 | "picasa-carousel": { | ||
27 | "prototype": "montage/ui/google/picasa-carousel.reel", | ||
28 | "properties": { | ||
29 | "element": {"#": "picasa-carousel"} | ||
30 | }, | ||
31 | "bindings": { | ||
32 | "queryParameter": { | ||
33 | "boundObject": {"@": "queryField"}, | ||
34 | "boundObjectPropertyPath": "value", | ||
35 | "oneway": true | ||
36 | } | ||
37 | } | ||
38 | }, | ||
39 | "queryField": { | ||
40 | "module": "montage/ui/textfield.reel", | ||
41 | "name": "Textfield", | ||
42 | "properties": { | ||
43 | "element": {"#": "queryField"} | ||
44 | } | ||
45 | }, | ||
46 | |||
47 | "searchButton": { | ||
48 | "module": "montage/ui/button.reel", | ||
49 | "name": "Button", | ||
50 | "properties": { | ||
51 | "element": {"#": "searchButton"} | ||
52 | } | ||
53 | } | ||
54 | |||
55 | |||
56 | |||
57 | } | ||
58 | </script> | ||
59 | |||
60 | </head> | ||
61 | <body> | ||
62 | |||
63 | <div id="main" class="main"> | ||
64 | <p>Main component of application</p> | ||
65 | <form id="searchForm" class="searchForm"> | ||
66 | <input type="text" id="queryField"> | ||
67 | <input type="submit" id="searchButton" class="submit btn" value="Search"> | ||
68 | </form> | ||
69 | |||
70 | <div data-montage-id="picasa-carousel"></div> | ||
71 | |||
72 | </div> | ||
73 | |||
74 | </body> | ||
75 | </html> | ||
diff --git a/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.js b/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.js new file mode 100755 index 00000000..3851d82b --- /dev/null +++ b/node_modules/montage/lab/sandbox/ui/picasa-carousel-test/main.reel/main.js | |||
@@ -0,0 +1,35 @@ | |||
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 | |||
10 | exports.Main = Montage.create(Component, { | ||
11 | |||
12 | templateDidLoad: { | ||
13 | value: function() { | ||
14 | //console.log("main templateDidLoad") | ||
15 | } | ||
16 | }, | ||
17 | picasaCarousel: { | ||
18 | enumerable: false, | ||
19 | value: null | ||
20 | }, | ||
21 | prepareForDraw: { | ||
22 | enumerable: false, | ||
23 | value: function() { | ||
24 | this.searchForm.identifier = "searchForm"; | ||
25 | this.searchForm.addEventListener("submit", this, false); | ||
26 | } | ||
27 | }, | ||
28 | handleSearchFormSubmit: { | ||
29 | value: function(evt) { | ||
30 | evt.preventDefault(); | ||
31 | this.picasaCarousel.performSearch(); | ||
32 | } | ||
33 | }, | ||
34 | |||
35 | }); | ||