diff options
Diffstat (limited to 'js/components/combobox.reel/combobox.js')
-rw-r--r-- | js/components/combobox.reel/combobox.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js index 3200b01c..bc433f52 100644 --- a/js/components/combobox.reel/combobox.js +++ b/js/components/combobox.reel/combobox.js | |||
@@ -104,6 +104,26 @@ exports.Combobox = Montage.create(Component, { | |||
104 | } | 104 | } |
105 | }, | 105 | }, |
106 | 106 | ||
107 | _visible: { | ||
108 | enumerable: false, | ||
109 | value: true | ||
110 | }, | ||
111 | |||
112 | visible: { | ||
113 | enumerable: true, | ||
114 | serializable: true, | ||
115 | get: function() { | ||
116 | return this._visible; | ||
117 | }, | ||
118 | set: function(value) { | ||
119 | if(value !== this._visible) | ||
120 | { | ||
121 | this._visible = value; | ||
122 | this.needsDraw = true; | ||
123 | } | ||
124 | } | ||
125 | }, | ||
126 | |||
107 | handleChange: | 127 | handleChange: |
108 | { | 128 | { |
109 | value:function(event) | 129 | value:function(event) |
@@ -158,6 +178,14 @@ exports.Combobox = Montage.create(Component, { | |||
158 | this.element.appendChild(optionItem); | 178 | this.element.appendChild(optionItem); |
159 | } | 179 | } |
160 | this.element.disabled = !this._enabled; | 180 | this.element.disabled = !this._enabled; |
181 | if(this._visible) | ||
182 | { | ||
183 | this.element.style.visibility = "visible"; | ||
184 | } | ||
185 | else | ||
186 | { | ||
187 | this.element.style.visibility = "hidden"; | ||
188 | } | ||
161 | } | 189 | } |
162 | } | 190 | } |
163 | }, | 191 | }, |