aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/bread-crumb.reel/bread-crumb.js
diff options
context:
space:
mode:
authorKruti Shah2012-05-31 10:44:45 -0700
committerKruti Shah2012-05-31 10:44:45 -0700
commitc350cc1c060fdf17357ddadce024267943784593 (patch)
tree453f86e88f1ee1dfda6fb4b7cc7b17e306e39536 /js/components/layout/bread-crumb.reel/bread-crumb.js
parentfdc4f5c7f81ae3b9adeca2232e60268b4be594a2 (diff)
parent121d0e616f48aa7cd048763554089c20a1883d7a (diff)
downloadninja-c350cc1c060fdf17357ddadce024267943784593.tar.gz
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts: js/panels/Timeline/Layer.reel/Layer.js Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/components/layout/bread-crumb.reel/bread-crumb.js')
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js28
1 files changed, 8 insertions, 20 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index c1b021a3..49dbe3cb 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -21,9 +21,9 @@ exports.Breadcrumb = Montage.create(Component, {
21 21
22 handleCloseDocument: { 22 handleCloseDocument: {
23 value: function(){ 23 value: function(){
24 if(!this.application.ninja.documentController.activeDocument) { 24 if(!this.application.ninja.documentController.activeDocument && this.application.ninja.currentDocument.currentView !== "code") {
25 this.disabled = true; 25 this.disabled = true;
26 this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); 26 this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.model.documentRoot : null);
27 } 27 }
28 } 28 }
29 }, 29 },
@@ -60,30 +60,18 @@ exports.Breadcrumb = Montage.create(Component, {
60 value: function() { 60 value: function() {
61 var parentNode; 61 var parentNode;
62 62
63 this.containerElements.length = 0; 63// delete this.containerElements;
64 this.containerElements = [];
64 65
65 parentNode = this.container; 66 parentNode = this.container;
66 67
67 // This is for the old template support. 68 while(parentNode !== this.application.ninja.currentDocument.model.documentRoot) {
68 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
69 if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") {
70 while(parentNode.id !== "UserContent") {
71 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
72 parentNode = parentNode.parentNode;
73 }
74
75 // This is always the top container which is now hardcoded to body
76 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"});
77 } else {
78 while(parentNode !== this.application.ninja.currentDocument.documentRoot) {
79 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
80 parentNode = parentNode.parentNode;
81 }
82
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}); 69 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
70 parentNode = parentNode.parentNode;
85 } 71 }
86 72
73 // This is always the top container which is now hardcoded to body
74 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
87 } 75 }
88 }, 76 },
89 77