diff options
author | Valerio Virgillito | 2012-02-28 00:47:46 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-28 00:47:46 -0800 |
commit | 19e94dc51a279501352a08d511b18144f83500e5 (patch) | |
tree | 03d94dee053cb61da4568b8ace9c6123dbc35bf7 /js/components/layout | |
parent | db5db0a92c1fb67eac262c33d4fbf776ceabbb3c (diff) | |
download | ninja-19e94dc51a279501352a08d511b18144f83500e5.tar.gz |
cleanup and fixing selecting each bread crumb
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/components/layout')
6 files changed, 64 insertions, 212 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 deleted file mode 100755 index 9d0a1eb4..00000000 --- a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.css +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
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 | |||
7 | .breadcrumbbuttonBackground { | ||
8 | height: 20px; | ||
9 | min-width: 50px; | ||
10 | margin: auto; | ||
11 | border:1px solid black; | ||
12 | float:left; | ||
13 | margin-left:10px; | ||
14 | background:#474747; | ||
15 | margin-top:3px; | ||
16 | } | ||
17 | |||
18 | |||
19 | .breadcrumbtoolBarButton { | ||
20 | border: 1px; | ||
21 | color: white; | ||
22 | text-align:-webkit-center; | ||
23 | margin-top : 4px; | ||
24 | cursor :default; | ||
25 | font-family: 'Droid Sans'; | ||
26 | font-size: 12px; | ||
27 | text-shadow: 1px 1px 1px black; | ||
28 | |||
29 | } | ||
30 | |||
31 | |||
32 | |||
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 deleted file mode 100755 index b3fdb0b6..00000000 --- a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.html +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
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 | |||
11 | <link rel="stylesheet" type="text/css" href="bread-crumb-button.css"> | ||
12 | |||
13 | <script type="text/montage-serialization"> | ||
14 | { | ||
15 | "owner": { | ||
16 | "module": "js/components/layout/bread-crumb-button.reel", | ||
17 | "name": "BreadcrumbButton", | ||
18 | "properties": { | ||
19 | "element": {"#": "breadcrumbbuttonBackground"}, | ||
20 | "button": {"#": "breadCrumbButton"} | ||
21 | } | ||
22 | } | ||
23 | } | ||
24 | </script> | ||
25 | |||
26 | |||
27 | </head> | ||
28 | |||
29 | <body> | ||
30 | <div id="breadcrumbbuttonBackground" class="breadcrumbbuttonBackground"> | ||
31 | <div id="breadCrumbButton" class="breadcrumbtoolBarButton"></div> | ||
32 | </div> | ||
33 | </body> | ||
34 | |||
35 | </html> | ||
36 | |||
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 deleted file mode 100755 index c1ac99bd..00000000 --- a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
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 | |||
7 | var Montage = require("montage/core/core").Montage; | ||
8 | var Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.BreadcrumbButton = Montage.create(Component, { | ||
11 | |||
12 | button: { | ||
13 | value: null | ||
14 | }, | ||
15 | |||
16 | data: { | ||
17 | value: null | ||
18 | }, | ||
19 | |||
20 | // Bound container for the button | ||
21 | container: { | ||
22 | value: null | ||
23 | }, | ||
24 | |||
25 | prepareForDraw: { | ||
26 | value: function() { | ||
27 | this.element.addEventListener("mousedown", this, false); | ||
28 | } | ||
29 | }, | ||
30 | |||
31 | draw: { | ||
32 | value: function() { | ||
33 | |||
34 | // Temporary until we have the new template | ||
35 | /* | ||
36 | if(this.container.id === "UserContent") { | ||
37 | this.button.innerHTML = "Body"; | ||
38 | } else { | ||
39 | this.button.innerHTML = this.container.nodeName.toLowerCase(); | ||
40 | } | ||
41 | */ | ||
42 | // | ||
43 | |||
44 | if(this.data.element.id === "UserContent") { | ||
45 | this.button.innerHTML = "Body"; | ||
46 | } else { | ||
47 | this.button.innerHTML = this.data.element.nodeName; | ||
48 | } | ||
49 | |||
50 | } | ||
51 | }, | ||
52 | |||
53 | handleMousedown: { | ||
54 | value: function(event) { | ||
55 | NJevent('breadCrumbTrail',this.data); | ||
56 | } | ||
57 | } | ||
58 | |||
59 | }); \ No newline at end of file | ||
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.css b/js/components/layout/bread-crumb.reel/bread-crumb.css index 0ca8adec..ae1ea794 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.css +++ b/js/components/layout/bread-crumb.reel/bread-crumb.css | |||
@@ -11,17 +11,8 @@ | |||
11 | 11 | ||
12 | -webkit-box-flex: 0; | 12 | -webkit-box-flex: 0; |
13 | } | 13 | } |
14 | .bread_crumb_button{ | ||
15 | background-color: #575757; | ||
16 | float: left; | ||
17 | width: 40px; | ||
18 | height: 20px; | ||
19 | margin-left: 5px; | ||
20 | margin-top: 3px; | ||
21 | |||
22 | font-family: 'Droid Sans', sans-serif; | ||
23 | font-size: 12px; | ||
24 | text-shadow: 1px 1px 1px black; | ||
25 | 14 | ||
26 | color: white; | 15 | .breadcrumbTrail button { |
27 | } \ No newline at end of file | 16 | float: left; |
17 | width: 60px; | ||
18 | } | ||
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index 234596a6..f2368e9a 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html | |||
@@ -17,43 +17,50 @@ | |||
17 | "name": "Breadcrumb", | 17 | "name": "Breadcrumb", |
18 | "properties": { | 18 | "properties": { |
19 | "element": {"#": "breadcrumbTrail"}, | 19 | "element": {"#": "breadcrumbTrail"}, |
20 | "button" : {"@":"breadCrumbButton"}, | 20 | "breadcrumbBt": {"@": "breadCrumbButton"} |
21 | "stylerepetition" : {"@":"repetition1"} | ||
22 | |||
23 | } | 21 | } |
24 | }, | 22 | }, |
25 | 23 | ||
26 | "breadCrumbButton": { | 24 | "breadCrumbButton": { |
27 | "module": "js/components/layout/bread-crumb-button.reel", | 25 | "module": "montage/ui/button.reel", |
28 | "name": "BreadcrumbButton", | 26 | "name": "Button", |
29 | "properties": { | 27 | "properties": { |
30 | "element": {"#": "breadcrumb_button"} | 28 | "element": {"#": "breadcrumb_button"} |
31 | }, | 29 | }, |
32 | "bindings": { | 30 | "listeners": [ |
33 | "data": { | 31 | { |
34 | "boundObject": {"@": "repetition1"}, | 32 | "type": "action", |
35 | "boundObjectPropertyPath": "objectAtCurrentIteration", | 33 | "listener": {"@": "owner"} |
36 | "oneway": true | 34 | } |
37 | } | 35 | ], |
38 | } | 36 | "bindings": { |
39 | }, | 37 | "label": { |
40 | 38 | "boundObject": {"@": "repetition1"}, | |
41 | "repetition1": { | 39 | "boundObjectPropertyPath": "objectAtCurrentIteration.label", |
42 | "module": "montage/ui/repetition.reel", | 40 | "oneway": true |
43 | "name": "Repetition", | 41 | }, |
44 | "properties": { | 42 | "value": { |
45 | "element": {"#": "b |