dustin@747: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz dustin@747: * Software engineering by Intevation GmbH dustin@747: * dustin@747: * This file is Free Software under the GNU GPL (v>=3) dustin@747: * and comes with ABSOLUTELY NO WARRANTY! Check out dustin@747: * the documentation coming with IMIS-Labordaten-Application for details. dustin@747: */ dustin@747: dustin@747: /** dustin@747: * This is a Widget for a ProbenPlanungSwitcher dustin@747: */ dustin@747: Ext.define('Lada.view.ProbenPlanungSwitcher', { dustin@747: extend: 'Ext.form.RadioGroup', dustin@747: alias: 'widget.probenplanungswitcher', dustin@747: dustin@747: mixins: { dustin@747: observable: 'Ext.util.Observable' dustin@747: }, dustin@747: /** dustin@747: * Initialise the Widget. dustin@747: * When the Checkbox is checked, it fires a 'check' Event dustin@747: */ dustin@747: initComponent: function() { dustin@747: var i18n = Lada.getApplication().bundle; dustin@747: this.items= [{ dustin@747: xtype: 'panel', dustin@747: border: false, dustin@747: items: [{ dustin@747: xtype: 'radiogroup', dustin@747: fieldLabel: i18n.getMsg('modus'), dustin@747: //labelWidth: '30 px', dustin@747: columns: 'auto', dustin@747: vertical: false, dustin@747: width: '100%', dustin@747: items: [{ dustin@747: xtype: 'radiofield', dustin@747: name: 'ppswitch', dustin@747: boxLabel: i18n.getMsg('probelist'), dustin@747: boxLabelAlign: 'before', dustin@747: inputValue: 'probenliste', dustin@747: checked: true, dustin@747: handler: function(field, state){ dustin@747: if (state === true) { dustin@747: this.fireEvent('check', field); dustin@747: } dustin@747: } dustin@747: },{ dustin@747: xtype: 'radiofield', dustin@747: name: 'ppswitch', dustin@747: boxLabel: i18n.getMsg('probeplanning'), dustin@747: boxLabelAlign: 'before', dustin@747: inputValue: 'probenplanung', dustin@747: handler: function(field, state){ dustin@747: if (state === true) { dustin@747: this.fireEvent('check', field); dustin@747: } dustin@747: } dustin@747: }] dustin@747: }] dustin@747: }]; dustin@747: this.callParent(arguments); dustin@747: } dustin@747: });