diff options
5 files changed, 174 insertions, 13 deletions
diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.css b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.css new file mode 100755 index 00000000..9d6c37a7 --- /dev/null +++ b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.css | |||
@@ -0,0 +1,30 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility LLC. | ||
3 | All Rights Reserved. | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without | ||
6 | modification, are permitted provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, | ||
9 | this list of conditions and the following disclaimer. | ||
10 | |||
11 | * Redistributions in binary form must reproduce the above copyright notice, | ||
12 | this list of conditions and the following disclaimer in the documentation | ||
13 | and/or other materials provided with the distribution. | ||
14 | |||
15 | * Neither the name of Motorola Mobility LLC nor the names of its | ||
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
18 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
29 | POSSIBILITY OF SUCH DAMAGE. | ||
30 | </copyright> */ | ||
diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.html b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.html new file mode 100755 index 00000000..6c881277 --- /dev/null +++ b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.html | |||
@@ -0,0 +1,75 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | Copyright (c) 2012, Motorola Mobility LLC. | ||
4 | All Rights Reserved. | ||
5 | |||
6 | Redistribution and use in source and binary forms, with or without | ||
7 | modification, are permitted provided that the following conditions are met: | ||
8 | |||
9 | * Redistributions of source code must retain the above copyright notice, | ||
10 | this list of conditions and the following disclaimer. | ||
11 | |||
12 | * Redistributions in binary form must reproduce the above copyright notice, | ||
13 | this list of conditions and the following disclaimer in the documentation | ||
14 | and/or other materials provided with the distribution. | ||
15 | |||
16 | * Neither the name of Motorola Mobility LLC nor the names of its | ||
17 | contributors may be used to endorse or promote products derived from this | ||
18 | software without specific prior written permission. | ||
19 | |||
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
30 | POSSIBILITY OF SUCH DAMAGE. | ||
31 | </copyright> --> | ||
32 | <html lang="en"> | ||
33 | <head> | ||
34 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
35 | <link rel="stylesheet" type="text/css" href="bread-crumb-button.css"> | ||
36 | |||
37 | |||
38 | <script type="text/montage-serialization"> | ||
39 | { | ||
40 | "owner": { | ||
41 | "prototype": "js/components/layout/bread-crumb-button.reel", | ||
42 | "properties": { | ||
43 | "element": {"#": "breadcrumb_container"} | ||
44 | |||
45 | } | ||
46 | }, | ||
47 | |||
48 | "breadCrumbButton": { | ||
49 | "prototype": "montage/ui/native/button.reel", | ||
50 | "properties": { | ||
51 | "element": {"#": "breadcrumb_button"} | ||
52 | }, | ||
53 | "listeners": [ | ||
54 | { | ||
55 | "type": "action", | ||
56 | "listener": {"@": "owner"} | ||
57 | } | ||
58 | ], | ||
59 | "bindings": { | ||
60 | "label": {"<-": "@owner.label"}, | ||
61 | "value": {"<-": "@owner.value"} | ||
62 | } | ||
63 | } | ||
64 | } | ||
65 | </script> | ||
66 | |||
67 | </head> | ||
68 | <body> | ||
69 | |||
70 | <div data-montage-id="breadcrumb_container"> | ||
71 | <button data-montage-id="breadcrumb_button" class="nj-skinned"></button> | ||
72 | </div> | ||
73 | |||
74 | </body> | ||
75 | </html> | ||
diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js new file mode 100755 index 00000000..89df2fa0 --- /dev/null +++ b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js | |||
@@ -0,0 +1,63 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility LLC. | ||
3 | All Rights Reserved. | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without | ||
6 | modification, are permitted provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, | ||
9 | this list of conditions and the following disclaimer. | ||
10 | |||
11 | * Redistributions in binary form must reproduce the above copyright notice, | ||
12 | this list of conditions and the following disclaimer in the documentation | ||
13 | and/or other materials provided with the distribution. | ||
14 | |||
15 | * Neither the name of Motorola Mobility LLC nor the names of its | ||
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
18 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
29 | POSSIBILITY OF SUCH DAMAGE. | ||
30 | </copyright> */ | ||
31 | |||
32 | var Montage = require("montage/core/core").Montage, | ||
33 | Component = require("montage/ui/component").Component; | ||
34 | |||
35 | exports.BreadCrumbButton = Montage.create(Component, { | ||
36 | |||
37 | _label: { | ||
38 | value: null | ||
39 | }, | ||
40 | |||
41 | label: { | ||
42 | get: function() { | ||
43 | return this._label; | ||
44 | }, | ||
45 | set: function(value) { | ||
46 | this._label = value | ||
47 | } | ||
48 | }, | ||
49 | |||
50 | _value: { | ||
51 | value: null | ||
52 | }, | ||
53 | |||
54 | value: { | ||
55 | get: function() { | ||
56 | return this._value; | ||
57 | }, | ||
58 | set: function(value) { | ||
59 | this._value = value; | ||
60 | } | ||
61 | } | ||
62 | }); | ||
63 | |||
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index 19707632..2c6d941f 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html | |||
@@ -40,22 +40,15 @@ POSSIBILITY OF SUCH DAMAGE. | |||
40 | "owner": { | 40 | "owner": { |
41 | "prototype": "js/components/layout/bread-crumb.reel[Breadcrumb]", | 41 | "prototype": "js/components/layout/bread-crumb.reel[Breadcrumb]", |
42 | "properties": { | 42 | "properties": { |
43 | "element": {"#": "breadcrumbTrail"}, | 43 | "element": {"#": "breadcrumbTrail"} |
44 | "breadcrumbBt": {"@": "breadCrumbButton"} | ||
45 | } | 44 | } |
46 | }, | 45 | }, |
47 | 46 | ||
48 | "breadCrumbButton": { | 47 | "breadcrumbButton": { |
49 | "prototype": "montage/ui/native/button.reel", | 48 | "prototype": "js/components/layout/bread-crumb-button.reel", |
50 | "properties": { | 49 | "properties": { |
51 | "element": {"#": "breadcrumb_button"} | 50 | "element": {"#": "breadcrumbButton"} |
52 | }, | 51 | }, |
53 | "listeners": [ | ||
54 | { | ||
55 | "type": "action", | ||
56 | "listener": {"@": "owner"} | ||
57 | } | ||
58 | ], |