diff options
author | Nivesh Rajbhandari | 2012-02-06 14:03:40 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-06 14:18:58 -0800 |
commit | f94b0c5ada403379b3ff8a900c2a2aabcecce49e (patch) | |
tree | 07d28ffb913e0a06e70d0792dcd1b2a87f7b7a83 /js/components | |
parent | 5737864d1d55d96e3cc3c1bc9b38ec58303b3981 (diff) | |
download | ninja-f94b0c5ada403379b3ff8a900c2a2aabcecce49e.tar.gz |
Add enabled property for ComboBox to support enabling/disabling materials dropdowns in the PI.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/components')
-rw-r--r-- | js/components/combobox.reel/combobox.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js index a68a7d6b..deef2a47 100644 --- a/js/components/combobox.reel/combobox.js +++ b/js/components/combobox.reel/combobox.js | |||
@@ -76,6 +76,26 @@ exports.Combobox = Montage.create(Component, { | |||
76 | } | 76 | } |
77 | }, | 77 | }, |
78 | 78 | ||
79 | _enabled: { | ||
80 | enumerable: false, | ||
81 | value: true | ||
82 | }, | ||
83 | |||
84 | enabled: { | ||
85 | enumerable: true, | ||
86 | serializable: true, | ||
87 | get: function() { | ||
88 | return this._enabled; | ||
89 | }, | ||
90 | set: function(value) { | ||
91 | if(value !== this._enabled) | ||
92 | { | ||
93 | this._enabled = value; | ||
94 | this.needsDraw = true; | ||
95 | } | ||
96 | } | ||
97 | }, | ||
98 | |||
79 | handleChange: | 99 | handleChange: |
80 | { | 100 | { |
81 | value:function(event) | 101 | value:function(event) |
@@ -117,6 +137,7 @@ exports.Combobox = Montage.create(Component, { | |||
117 | } | 137 | } |
118 | this.element.appendChild(optionItem); | 138 | this.element.appendChild(optionItem); |
119 | } | 139 | } |
140 | this.element.disabled = !this._enabled; | ||
120 | } | 141 | } |
121 | } | 142 | } |
122 | }, | 143 | }, |