Sha256: 0eb2944a1285cfd11acd7e876278f4006a5305e193a393e862c985224fefbf6c
Contents?: true
Size: 1019 Bytes
Versions: 9
Compression:
Stored size: 1019 Bytes
Contents
Ext.ns("Ext.netzke.form"); /* A very simple RadioGroup extension. Config options: * options: 1) all radio buttons, by boxLabel, e.g.: ["Cool", "To read", "Important"] 2) array of arrays in format [value, label], e.g.: [[1, "Good"], [2, "Average"], [3, "Poor"]] */ Ext.define('Ext.netzke.form.NRadioGroup', { extend: 'Ext.form.RadioGroup', alias: 'widget.nradiogroup', initComponent: function(){ this.callParent(); this.items = []; Ext.each(this.options, function(o){ if (Ext.isArray(o)){ this.items.push({boxLabel: o[1], name: this.name, inputValue: o[0]}); } else { this.items.push({boxLabel: o, name: this.name, inputValue: o}); } }, this); // delete this.name; }, getValue: function() { var value; this.items.each(function(i) { value = i.inputValue; return !i.getValue(); }); return value; }, setReadonlyMode: function(onOff) { this.items.each(function(i){ i.setReadonlyMode(onOff); }); } });
Version data entries
9 entries across 9 versions & 2 rubygems