aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnanya Sen2012-03-22 15:11:51 -0700
committerAnanya Sen2012-03-22 15:11:51 -0700
commitd4f23044866f4e8611cddc49f80eaf91f6dfa873 (patch)
treed121a99e6de3be58cc9698a07ac262971af08bd9
parent80ceeffeb3dd3227008714b8b56383f9556ff409 (diff)
downloadninja-d4f23044866f4e8611cddc49f80eaf91f6dfa873.tar.gz
- removed menu-data boundObj path support for now
- fixed error on clicking on disabled menu item Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js8
1 files changed, 3 insertions, 5 deletions
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, {
84 } 84 }
85 85
86 if(this.data.enabled.boundProperty) { 86 if(this.data.enabled.boundProperty) {
87 strArr = this.data.enabled.boundObj.split("."); 87
88 for(i=0;i<strArr.length;i++){ 88 boundObject = this.application.ninja[this.data.enabled.boundObj];
89 boundObject = boundObject[strArr[i]];
90 }
91 89
92 Object.defineBinding(this, "enabled", { 90 Object.defineBinding(this, "enabled", {
93 boundObject: boundObject, 91 boundObject: boundObject,
@@ -143,7 +141,7 @@ exports.MenuItem = Montage.create(Component, {
143 141
144 if(this.data.radio && this.checked) return; 142 if(this.data.radio && this.checked) return;
145 143
146 if(this.enabled || !this.submenu) { 144 if(((this.data.enabled === true) || (this.data.enabled.boundProperty && (this.data.enabled.value === true))) && (this.submenu === false) ) {
147 if(this.data.action) { 145 if(this.data.action) {
148 NJevent ( this.data.action ); 146 NJevent ( this.data.action );
149 } else if(this.checked !== null) { 147 } else if(this.checked !== null) {