From ca902f0bff569ad441ca4556a7d96500e732a0a4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 21:37:49 -0700 Subject: disabling the menu when closing all files Signed-off-by: Valerio Virgillito --- js/data/menu-data.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 6c597542..b6350893 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -24,9 +24,15 @@ exports.MenuData = Montage.create(Component, { this._currentDocument = value; - this.documentEnabledIndices.forEach(function(index) { - index.enabled = true; - }); + if(!this._currentDocument) { + this.documentEnabledIndices.forEach(function(index) { + index.enabled = false; + }); + } else { + this.documentEnabledIndices.forEach(function(index) { + index.enabled = true; + }); + } } }, -- cgit v1.2.3