| | 145 | |
|---|
| | 146 | /** |
|---|
| | 147 | * Class: BooleanProperty |
|---|
| | 148 | */ |
|---|
| | 149 | mapfish.widgets.editing.BooleanProperty = function(config) { |
|---|
| | 150 | this.type = 'boolean'; |
|---|
| | 151 | this.defaultValue = false; |
|---|
| | 152 | mapfish.widgets.editing.FloatProperty.superclass.constructor.call(this, config); |
|---|
| | 153 | }; |
|---|
| | 154 | Ext.extend(mapfish.widgets.editing.BooleanProperty, mapfish.widgets.editing.BaseProperty, { |
|---|
| | 155 | /** |
|---|
| | 156 | * APIProperty: checkboxConfig |
|---|
| | 157 | * {Object} - The config object to pass to the Ext.data.Checkbox constructor. |
|---|
| | 158 | */ |
|---|
| | 159 | checkboxConfig: null, |
|---|
| | 160 | |
|---|
| | 161 | /** |
|---|
| | 162 | * Method: getExtField |
|---|
| | 163 | */ |
|---|
| | 164 | getExtField: function() { |
|---|
| | 165 | var config = OpenLayers.Util.applyDefaults({ |
|---|
| | 166 | name: this.name, |
|---|
| | 167 | fieldLabel: this.label || this.name |
|---|
| | 168 | }, this.checkboxConfig); |
|---|
| | 169 | return new Ext.form.Checkbox(config); |
|---|
| | 170 | } |
|---|
| | 171 | }); |
|---|