aboutsummaryrefslogtreecommitdiff
path: root/js/components/menu/menu-item.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-06-04 10:43:29 -0700
committerAnanya Sen2012-06-04 10:43:29 -0700
commit6fb29883329c9c42a8b406128b92c0e6323a47be (patch)
tree07f46e88bccf9cdb7d4e6818e1b646b0d19f05b9 /js/components/menu/menu-item.reel
parentcf097ec69e35c07ecae5a105ed5eeb78291c9ac2 (diff)
parentc1ec69879028220b0c3f11ad6e24035bf527802c (diff)
downloadninja-6fb29883329c9c42a8b406128b92c0e6323a47be.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Conflicts: js/ninja.reel/ninja.html Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components/menu/menu-item.reel')
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.html13
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js18
2 files changed, 4 insertions, 27 deletions
diff --git a/js/components/menu/menu-item.reel/menu-item.html b/js/components/menu/menu-item.reel/menu-item.html
index 5ff8c0fc..1902833a 100755
--- a/js/components/menu/menu-item.reel/menu-item.html
+++ b/js/components/menu/menu-item.reel/menu-item.html
@@ -17,11 +17,7 @@
17 "automaticallyOrganizeObjects": false 17 "automaticallyOrganizeObjects": false
18 }, 18 },
19 "bindings": { 19 "bindings": {
20 "content": { 20 "content": {"<-": "@owner.subentries"}
21 "boundObject": {"@": "owner"},
22 "boundObjectPropertyPath": "subentries",
23 "oneway": true
24 }
25 } 21 }
26 }, 22 },
27 23
@@ -39,11 +35,8 @@
39 "element": {"#": "menuEntryItem" } 35 "element": {"#": "menuEntryItem" }
40 }, 36 },
41 "bindings": { 37 "bindings": {
42 "data": { 38 "data": {"<-": "@repetition.objectAtCurrentIteration"},
43 "boundObject": {"@": "repetition"}, 39 "enabled": {"<-": "@repetition.objectAtCurrentIteration.enabled"}
44 "boundObjectPropertyPath": "objectAtCurrentIteration",
45 "oneway": true
46 }
47 } 40 }
48 }, 41 },
49 42
diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js
index fc3913b8..c00c4412 100755
--- a/js/components/menu/menu-item.reel/menu-item.js
+++ b/js/components/menu/menu-item.reel/menu-item.js
@@ -14,7 +14,7 @@ exports.MenuItem = Montage.create(Component, {
14 }, 14 },
15 15
16 _enabled: { 16 _enabled: {
17 value: null 17 value: false
18 }, 18 },
19 19
20 enabled: { 20 enabled: {
@@ -61,7 +61,6 @@ 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
66 if(!this.data) return; 65 if(!this.data) return;
67 66
@@ -83,21 +82,6 @@ exports.MenuItem = Montage.create(Component, {
83 82
84 } 83 }
85 84
86 if(this.data.enabled.boundProperty) {
87
88 boundObject = this.application.ninja[this.data.enabled.boundObj];
89
90 Object.defineBinding(this, "enabled", {
91 boundObject: boundObject,
92 boundObjectPropertyPath: this.data.enabled.boundProperty,
93 boundValueMutator: this.data.enabled.boundValueMutator,
94 oneway : this.data.enabled.oneway
95 });
96
97 } else {
98 this.enabled = this.data.enabled;
99 }
100
101 if(this.data.submenu) { 85 if(this.data.submenu) {
102 this.submenu = true; 86 this.submenu = true;
103 87