Changeset 1280

Show
Ignore:
Timestamp:
11/03/08 14:33:05 (2 months ago)
Author:
elemoine
Message:

add a new feature property: Boolean Propery?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/camptocamp/MapFishUnhcr/client/mfbase/mapfish/widgets/editing/FeatureProperties.js

    r1279 r1280  
    143143} 
    144144Ext.extend(mapfish.widgets.editing.FloatProperty, mapfish.widgets.editing.SimpleProperty); 
     145 
     146/** 
     147 * Class: BooleanProperty 
     148 */ 
     149mapfish.widgets.editing.BooleanProperty = function(config) { 
     150    this.type = 'boolean'; 
     151    this.defaultValue = false; 
     152    mapfish.widgets.editing.FloatProperty.superclass.constructor.call(this, config); 
     153}; 
     154Ext.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}); 
    145172 
    146173/**