diff options
author | Pushkar Joshi | 2012-06-13 14:00:31 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-06-13 14:00:31 -0700 |
commit | 596765056ca6e5b08395c6d7ea19e7684c2acaf3 (patch) | |
tree | 480f42ffc0782ca768284c1208a8f99adb5636a2 /js/components/menu/menu-entry.reel/menu-entry.js | |
parent | 75df16b937bb420e7d93a411e73f7b59578b1b7e (diff) | |
parent | 682f4917d6badd105998c3dd84d031c38b51f017 (diff) | |
download | ninja-596765056ca6e5b08395c6d7ea19e7684c2acaf3.tar.gz |
Merge branch 'master' into brushtool
Diffstat (limited to 'js/components/menu/menu-entry.reel/menu-entry.js')
-rwxr-xr-x | js/components/menu/menu-entry.reel/menu-entry.js | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index 57e6ec87..b9c546ed 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js | |||
@@ -8,18 +8,54 @@ var Montage = require("montage/core/core").Montage; | |||
8 | var Component = require("montage/ui/component").Component; | 8 | var Component = require("montage/ui/component").Component; |
9 | 9 | ||
10 | exports.MenuEntry = Montage.create(Component, { | 10 | exports.MenuEntry = Montage.create(Component, { |
11 | topHeader: { value: null }, | 11 | topHeader: { |
12 | topHeaderText: { value: null }, | 12 | value: null, |
13 | serializable: true | ||
14 | }, | ||
15 | |||
16 | topHeaderText: { | ||
17 | value: null, | ||
18 | serializable: true | ||
19 | }, | ||
20 | |||
21 | subEntries: { | ||
22 | value: null, | ||
23 | serializable: true | ||
24 | }, | ||
13 | 25 | ||
14 | // Reference to the parent Menu component | 26 | // Reference to the parent Menu component |
15 | _menu: { | 27 | _menu: { |
16 | value: null | 28 | value: null |
17 | }, | 29 | }, |
18 | 30 | ||
19 | data: { | 31 | menu: { |
32 | get: function() { | ||
33 | return this._menu; | ||
34 | }, | ||
35 | set: function(value) { | ||
36 | if(value !== this._menu) { | ||
37 | this._menu = value; | ||
38 | } | ||
39 | }, | ||
40 | serializable: true | ||
41 | }, | ||
42 | |||
43 | _data: { | ||
20 | value: null | 44 | value: null |
21 | }, | 45 | }, |
22 | 46 | ||
47 | data: { | ||
48 | get: function() { | ||
49 | return this._data; | ||
50 | }, | ||
51 | set: function(value) { | ||
52 | if(this._data !== value) { | ||
53 | this._data = value; | ||
54 | } | ||
55 | }, | ||
56 | serializable: true | ||
57 | }, | ||
58 | |||
23 | select: { | 59 | select: { |
24 | value: function() { | 60 | value: function() { |
25 | this.element.classList.add("selected"); | 61 | this.element.classList.add("selected"); |
@@ -49,13 +85,16 @@ exports.MenuEntry = Montage.create(Component, { | |||
49 | 85 | ||
50 | handleClick: { | 86 | handleClick: { |
51 | value: function(event) { | 87 | value: function(event) { |
52 | this._menu.toggleActivation(this); | 88 | // TODO: Hack! Rework this! |
89 | this.parentComponent.ownerComponent.toggleActivation(this); | ||
90 | // this._menu.toggleActivation(this); | ||
53 | } | 91 | } |
54 | }, | 92 | }, |
55 | 93 | ||
56 | handleMouseover: { | 94 | handleMouseover: { |
57 | value: function(event) { | 95 | value: function(event) { |
58 | this._menu.activeEntry = this; | 96 | this.parentComponent.ownerComponent.activeEntry = this; |
97 | // this._menu.activeEntry = this; | ||
59 | } | 98 | } |
60 | }, | 99 | }, |
61 | 100 | ||