aboutsummaryrefslogtreecommitdiff
path: root/js/components/menu/menu-item.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/menu/menu-item.reel')
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js13
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 {