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/components/menu/menu-item.reel/menu-item.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'js/components/menu/menu-item.reel/menu-item.js') diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js index 64a89a6a..8d975c4b 100755 --- a/js/components/menu/menu-item.reel/menu-item.js +++ b/js/components/menu/menu-item.reel/menu-item.js @@ -61,6 +61,8 @@ exports.MenuItem = Montage.create(Component, { prepareForDraw: { value: function() { + var boundObject = this.application.ninja, strArr = null, i=0; + if(!this.data) return; if(this.data.separator) { @@ -82,9 +84,16 @@ exports.MenuItem = Montage.create(Component, { } if(this.data.enabled.boundProperty) { + strArr = this.data.enabled.boundObj.split("."); + for(i=0;i --- js/components/menu/menu-item.reel/menu-item.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'js/components/menu/menu-item.reel/menu-item.js') diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js index 8d975c4b..3e1c43da 100755 --- a/js/components/menu/menu-item.reel/menu-item.js +++ b/js/components/menu/menu-item.reel/menu-item.js @@ -84,10 +84,8 @@ exports.MenuItem = Montage.create(Component, { } if(this.data.enabled.boundProperty) { - strArr = this.data.enabled.boundObj.split("."); - for(i=0;i --- js/components/menu/menu-item.reel/menu-item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/menu/menu-item.reel/menu-item.js') diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js index 3e1c43da..26fc7573 100755 --- a/js/components/menu/menu-item.reel/menu-item.js +++ b/js/components/menu/menu-item.reel/menu-item.js @@ -141,7 +141,7 @@ exports.MenuItem = Montage.create(Component, { if(this.data.radio && this.checked) return; - if(((this.data.enabled === true) || (this.data.enabled.boundProperty && (this.data.enabled.value === true))) && (this.submenu === false) ) { + if((this.enabled === true) && (this.submenu === false) ) { if(this.data.action) { NJevent ( this.data.action ); } else if(this.checked !== null) { -- cgit v1.2.3