Sha256: ec264d84ff8d44e19c06572a7bbeb383333628a74dfb25f006bdcf8b38b38675

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

Ext.define('FastUI.view.vfield.VRadio',{
    extend: 'Ext.form.RadioGroup',
    valueObject: {},
    winCtx:{},
    winId:0,
    rest:{},
    width:300,

    initComponent:function(){
        this.fieldLabel = this.getFValue('title');
        this.disabled = this.getFValue('readonly') || false;
        this.allowBlank = this.getFValue('required') || true;
        this.width = this.getFValue('width') || 650;
        this.vtype = this.getFValue('vtype');
        this.items = this.getFFields();
        this.callParent();
    },
    getFValue:function (key) {
        return this.valueObject[key] || '';
    },
    getFFields:function(){
        var fields = [];
        var store = FastUI.store.MListMgr.getStore(this.getFValue('name'));
        store.each(function(item, index, count) {
            fields.push({
                name: this.rest.getTableName() + '[' + this.getFValue('name') + ']',
                boxLabel: item.data.title,
                inputValue: item.data.name,
                width:100
            });
        },this);
        return fields;
    }

});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fastui-0.1.8 app/assets/javascripts/fastui/app/view/vfield/VRadio.js
fastui-0.1.7 app/assets/javascripts/fastui/app/view/vfield/VRadio.js
fastui-0.1.6 app/assets/javascripts/fastui/app/view/vfield/VRadio.js