From 61a419422b1a05a779fd9a66c53de3fa8ab5f65a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:28:34 -0700 Subject: - enable/disable save, saveAs, saveAll, close, closeAll as per documents open - added close file and close all menu items Signed-off-by: Ananya Sen Conflicts: js/helper-classes/3D/draw-utils.js Signed-off-by: Ananya Sen --- js/document/text-document.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/document/text-document.js') diff --git a/js/document/text-document.js b/js/document/text-document.js index 88464d87..54a53999 100755 --- a/js/document/text-document.js +++ b/js/document/text-document.js @@ -163,7 +163,13 @@ var TextDocument = exports.TextDocument = Montage.create(Component, { needsSave: { get: function() { return this._needsSave; }, - set: function(value) { this._needsSave = value } + set: function(value) { + var i=0, canSaveAll=false; + this._needsSave = value; + + this.application.ninja.documentController.canSave = value;//for save menu state update + this.application.ninja.documentController.canSaveAll = value;//for save menu state update..currently save all is tried to the current document only + } }, callback: { -- cgit v1.2.3