diff options
author | Ananya Sen | 2012-03-22 10:28:34 -0700 |
---|---|---|
committer | Ananya Sen | 2012-03-22 10:28:34 -0700 |
commit | 61a419422b1a05a779fd9a66c53de3fa8ab5f65a (patch) | |
tree | 54fca046a7d42577397f11f1b4841cfc18d72028 /js/components | |
parent | 57cc00a5ef3ab525e54a030d7692b2d9eefaa68b (diff) | |
download | ninja-61a419422b1a05a779fd9a66c53de3fa8ab5f65a.tar.gz |
- enable/disable save, saveAs, saveAll, close, closeAll as per documents open
- added close file and close all menu items
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Conflicts:
js/helper-classes/3D/draw-utils.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components')
-rwxr-xr-x | js/components/menu/menu-item.reel/menu-item.js | 13 |
1 files changed, 11 insertions, 2 deletions
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, { | |||
61 | 61 | ||
62 | prepareForDraw: { | 62 | prepareForDraw: { |
63 | value: function() { | 63 | value: function() { |
64 | var boundObject = this.application.ninja, strArr = null, i=0; | ||
65 | |||
64 | if(!this.data) return; | 66 | if(!this.data) return; |
65 | 67 | ||
66 | if(this.data.separator) { | 68 | if(this.data.separator) { |
@@ -82,9 +84,16 @@ exports.MenuItem = Montage.create(Component, { | |||
82 | } | 84 | } |
83 | 85 | ||
84 | if(this.data.enabled.boundProperty) { | 86 | if(this.data.enabled.boundProperty) { |
87 | strArr = this.data.enabled.boundObj.split("."); | ||
88 | for(i=0;i<strArr.length;i++){ | ||
89 | boundObject = boundObject[strArr[i]]; | ||
90 | } | ||
91 | |||
85 | Object.defineBinding(this, "enabled", { | 92 | Object.defineBinding(this, "enabled", { |
86 | boundObject: this.application.ninja[this.data.enabled.boundObj], | 93 | boundObject: boundObject, |
87 | boundObjectPropertyPath: this.data.enabled.boundProperty | 94 | boundObjectPropertyPath: this.data.enabled.boundProperty, |
95 | boundValueMutator: this.data.enabled.boundValueMutator, | ||
96 | oneway : this.data.enabled.oneway | ||
88 | }); | 97 | }); |
89 | 98 | ||
90 | } else { | 99 | } else { |