diff options
Diffstat (limited to 'js/components/layout/bread-crumb.reel')
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.html | 19 | ||||
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.js | 5 |
2 files changed, 9 insertions, 15 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index 413f588d..ae3e2022 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <!-- <copyright> | 2 | <!-- <copyright> |
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | 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/> | 4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> |
@@ -13,8 +13,7 @@ | |||
13 | <script type="text/montage-serialization"> | 13 | <script type="text/montage-serialization"> |
14 | { | 14 | { |
15 | "owner": { | 15 | "owner": { |
16 | "module": "js/components/layout/bread-crumb.reel", | 16 | "prototype": "js/components/layout/bread-crumb.reel[Breadcrumb]", |
17 | "name": "Breadcrumb", | ||
18 | "properties": { | 17 | "properties": { |
19 | "element": {"#": "breadcrumbTrail"}, | 18 | "element": {"#": "breadcrumbTrail"}, |
20 | "breadcrumbBt": {"@": "breadCrumbButton"} | 19 | "breadcrumbBt": {"@": "breadCrumbButton"} |
@@ -22,8 +21,7 @@ | |||
22 | }, | 21 | }, |
23 | 22 | ||
24 | "breadCrumbButton": { | 23 | "breadCrumbButton": { |
25 | "module": "montage/ui/button.reel", | 24 | "prototype": "montage/ui/button.reel", |
26 | "name": "Button", | ||
27 | "properties": { | 25 | "properties": { |
28 | "element": {"#": "breadcrumb_button"} | 26 | "element": {"#": "breadcrumb_button"} |
29 | }, | 27 | }, |
@@ -48,8 +46,7 @@ | |||
48 | }, | 46 | }, |
49 | 47 | ||
50 | "repetition1": { | 48 | "repetition1": { |
51 | "module": "montage/ui/repetition.reel", | 49 | "prototype": "montage/ui/repetition.reel", |
52 | "name": "Repetition", | ||
53 | "properties": { | 50 | "properties": { |
54 | "element": {"#": "breadcrumb_container"} | 51 | "element": {"#": "breadcrumb_container"} |
55 | }, | 52 | }, |
@@ -81,11 +78,11 @@ | |||
81 | </head> | 78 | </head> |
82 | <body> | 79 | <body> |
83 | 80 | ||
84 | <section id="breadcrumbTrail" class="breadcrumbTrail"> | 81 | <section data-montage-id="breadcrumbTrail" class="breadcrumbTrail"> |
85 | <div id="breadcrumb_container"> | 82 | <div data-montage-id="breadcrumb_container"> |
86 | <button id="breadcrumb_button" class="nj-skinned"></button> | 83 | <button data-montage-id="breadcrumb_button" class="nj-skinned"></button> |
87 | </div> | 84 | </div> |
88 | <div id="disabledCondition" class="panelDisabled"></div> | 85 | <div data-montage-id="disabledCondition" class="panelDisabled"></div> |
89 | </section> | 86 | </section> |
90 | 87 | ||
91 | </body> | 88 | </body> |
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index ea7238fc..c1b021a3 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -23,7 +23,7 @@ exports.Breadcrumb = Montage.create(Component, { | |||
23 | value: function(){ | 23 | value: function(){ |
24 | if(!this.application.ninja.documentController.activeDocument) { | 24 | if(!this.application.ninja.documentController.activeDocument) { |
25 | this.disabled = true; | 25 | this.disabled = true; |
26 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; | 26 | this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); |
27 | } | 27 | } |
28 | } | 28 | } |
29 | }, | 29 | }, |
@@ -82,7 +82,6 @@ exports.Breadcrumb = Montage.create(Component, { | |||
82 | 82 | ||
83 | // This is always the top container which is now hardcoded to body | 83 | // This is always the top container which is now hardcoded to body |
84 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | 84 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); |
85 | console.log("this works!"); | ||
86 | } | 85 | } |
87 | 86 | ||
88 | } | 87 | } |
@@ -90,8 +89,6 @@ exports.Breadcrumb = Montage.create(Component, { | |||
90 | 89 | ||
91 | handleAction: { | 90 | handleAction: { |
92 | value: function(evt) { | 91 | value: function(evt) { |
93 | |||
94 | // this.application.ninja.currentDocument.breadCrumbClick=true; | ||
95 | if(evt.target.value === this.container.uuid) { | 92 | if(evt.target.value === this.container.uuid) { |
96 | return; | 93 | return; |
97 | } | 94 | } |