From 31b094ee21102f99a4021d505bc3a28527c9e23d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 30 May 2012 01:33:20 -0700 Subject: Fixing the close document. Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'js/components/layout/bread-crumb.reel') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index 74e89ac1..ac131f2c 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -26,12 +26,12 @@ exports.Breadcrumb = Montage.create(Component, { this._currentDocument = value; - if(!this._currentDocument) { + if(!value) { this.disabled = true; + } else { + this.disabled = this._currentDocument.currentView !== "design"; } - this.disabled = this._currentDocument.currentView !== "design"; - } }, @@ -51,15 +51,6 @@ exports.Breadcrumb = Montage.create(Component, { } }, - handleCloseDocument: { - value: function(){ - 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.model.documentRoot : null); - } - } - }, - _container:{ value:null }, @@ -82,7 +73,6 @@ exports.Breadcrumb = Montage.create(Component, { prepareForDraw: { value: function() { - this.eventManager.addEventListener("closeDocument", this, false); this.breadcrumbBt.addEventListener("action", this, false); } }, -- cgit v1.2.3