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@751: extend: 'Ext.form.FieldSet', 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@751: var i18n = Lada.getApplication().bundle; dustin@751: this.title = i18n.getMsg('modus'); dustin@751: this.items= [{ dustin@751: xtype: 'radiogroup', dustin@751: columns: 1, dustin@751: width: '100%', dustin@747: items: [{ dustin@751: xtype: 'radiofield', dustin@751: name: 'ppswitch', dustin@751: boxLabel: i18n.getMsg('probelist'), dustin@792: inputValue: 'ProbeList', //this determines the store dustin@751: // which will be loaded, dustin@792: //checked: true, dustin@751: handler: function(field, state){ dustin@751: if (state === true) { dustin@751: this.fireEvent('check', field); dustin@747: } dustin@751: } dustin@751: },{ dustin@751: xtype: 'radiofield', dustin@751: name: 'ppswitch', dustin@751: boxLabel: i18n.getMsg('probeplanning'), dustin@792: inputValue: 'MessprogrammList', //name of a store dustin@751: handler: function(field, state){ dustin@751: if (state === true) { dustin@751: this.fireEvent('check', field); dustin@747: } dustin@751: } dustin@747: }] dustin@751: }]; dustin@751: this.callParent(arguments); dustin@747: } dustin@747: });