From b97570f5daff9d0c40f274c2c29a457079da1c1a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 17 May 2012 12:23:31 -0700 Subject: fixing the breadcrumb Signed-off-by: Valerio Virgillito --- .../layout/bread-crumb.reel/bread-crumb.js | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'js/components/layout/bread-crumb.reel/bread-crumb.js') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index c1b021a3..d2a6b1e4 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -60,30 +60,18 @@ exports.Breadcrumb = Montage.create(Component, { value: function() { var parentNode; - this.containerElements.length = 0; +// delete this.containerElements; + this.containerElements = []; parentNode = this.container; - // This is for the old template support. - // TODO: Remove marker for old template: NINJA-STAGE-REWORK - if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") { - while(parentNode.id !== "UserContent") { - this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); - parentNode = parentNode.parentNode; - } - - // This is always the top container which is now hardcoded to body - this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); - } else { - while(parentNode !== this.application.ninja.currentDocument.documentRoot) { - this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); - parentNode = parentNode.parentNode; - } - - // This is always the top container which is now hardcoded to body + while(parentNode !== this.application.ninja.currentDocument.documentRoot) { this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); + parentNode = parentNode.parentNode; } + // This is always the top container which is now hardcoded to body + this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); } }, -- cgit v1.2.3 From 0ca1910df1c78116139664bf39a95cf0ec7c8dc8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 23 May 2012 15:35:15 -0700 Subject: adding document views checks for the timeline and breadcrumb Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout/bread-crumb.reel/bread-crumb.js') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index d2a6b1e4..aaefd923 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -21,7 +21,7 @@ exports.Breadcrumb = Montage.create(Component, { handleCloseDocument: { value: function(){ - if(!this.application.ninja.documentController.activeDocument) { + if(!this.application.ninja.documentController.activeDocument && this.application.ninja.currentDocument.currentView !== "code") { this.disabled = true; this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); } -- cgit v1.2.3 From 5914c5b2209c4b8daac4249bb76cda5c9314c4e6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 24 May 2012 00:07:23 -0700 Subject: Cleaning up referencing to 'documentRoot' and '_document' Moved to reference new model in DOM architecture rework. This should not affect anything, just moving the references, and also the setting to the render methods in the design view. --- js/components/layout/bread-crumb.reel/bread-crumb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/layout/bread-crumb.reel/bread-crumb.js') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index d2a6b1e4..2db775eb 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, { value: function(){ if(!this.application.ninja.documentController.activeDocument) { this.disabled = true; - this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); + this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.model.documentRoot : null); } } }, @@ -65,7 +65,7 @@ exports.Breadcrumb = Montage.create(Component, { parentNode = this.container; - while(parentNode !== this.application.ninja.currentDocument.documentRoot) { + while(parentNode !== this.application.ninja.currentDocument.model.documentRoot) { this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); parentNode = parentNode.parentNode; } -- cgit v1.2.3