aboutsummaryrefslogtreecommitdiff
path: root/js/components/menu/menu.reel
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-11 11:17:41 -0700
committerArmen Kesablyan2012-06-11 11:17:41 -0700
commit278769df00ced8620fd73371e38fe2e43f07ca3b (patch)
treedeb505c8a66b660eee1f17a2c6c4c575c7939f6f /js/components/menu/menu.reel
parent555fd6efa605b937800b3979a4c68fa7eb8666ae (diff)
parent0f040acabfb7a4bf3138debec5aff869487ceb11 (diff)
downloadninja-278769df00ced8620fd73371e38fe2e43f07ca3b.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: js/document/models/html.js js/document/views/design.js js/ninja.reel/ninja.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/components/menu/menu.reel')
-rwxr-xr-xjs/components/menu/menu.reel/menu.html25
-rwxr-xr-xjs/components/menu/menu.reel/menu.js17
2 files changed, 24 insertions, 18 deletions
diff --git a/js/components/menu/menu.reel/menu.html b/js/components/menu/menu.reel/menu.html
index 49956f8a..f15cf119 100755
--- a/js/components/menu/menu.reel/menu.html
+++ b/js/components/menu/menu.reel/menu.html
@@ -12,7 +12,10 @@
12 <script type="text/montage-serialization"> 12 <script type="text/montage-serialization">
13 { 13 {
14 "menudata": { 14 "menudata": {
15 "prototype": "js/data/menu-data" 15 "prototype": "js/data/menu-data",
16 "bindings": {
17 "currentDocument": {"<-": "@owner.currentDocument"}
18 }
16 }, 19 },
17 20
18 "menuController": { 21 "menuController": {
@@ -21,11 +24,7 @@
21 "automaticallyOrganizeObjects": false 24 "automaticallyOrganizeObjects": false
22 }, 25 },
23 "bindings": { 26 "bindings": {
24 "content": { 27 "content": {"<-": "@menudata.topLevelMenu"}
25 "boundObject": {"@": "menudata"},
26 "boundObjectPropertyPath": "topLevelMenu",
27 "oneway": true
28 }
29 } 28 }
30 }, 29 },
31 30
@@ -44,18 +43,8 @@
44 "element": { "#": "menuItem" } 43 "element": { "#": "menuItem" }
45 }, 44 },
46 "bindings": { 45 "bindings": {
47 "data": { 46 "data": {"<-": "@repetition.objectAtCurrentIteration"},
48 "boundObject": {"@": "repetition"}, 47 "_menu": {"<-": "@repetition.menuComponent"}
49 "boundObjectPropertyPath": "objectAtCurrentIteration",
50 "oneway": true
51 },
52 "_menu": {
53 "boundObject": {"@": "repetition"},
54 "boundObjectPropertyPath": "menuComponent",
55 "oneway": true
56 }
57
58
59 } 48 }
60 }, 49 },
61 50
diff --git a/js/components/menu/menu.reel/menu.js b/js/components/menu/menu.reel/menu.js
index fb221640..50d3f0bc 100755
--- a/js/components/menu/menu.reel/menu.js
+++ b/js/components/menu/menu.reel/menu.js
@@ -9,6 +9,23 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.Menu = Montage.create(Component, { 10exports.Menu = Montage.create(Component, {
11 11
12 _currentDocument: {
13 value : null
14 },
15
16 currentDocument : {
17 get : function() {
18 return this._currentDocument;
19 },
20 set : function(value) {
21 if (value === this._currentDocument) {
22 return;
23 }
24
25 this._currentDocument = value;
26 }
27 },
28
12 _active: { 29 _active: {
13 value: false 30 value: false
14 }, 31 },