torsten@472: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz torsten@472: * Software engineering by Intevation GmbH torsten@472: * torsten@472: * This file is Free Software under the GNU GPL (v>=3) torsten@472: * and comes with ABSOLUTELY NO WARRANTY! Check out torsten@472: * the documentation coming with IMIS-Labordaten-Application for details. torsten@472: */ torsten@472: torsten@351: /* torsten@351: * Formular to create and edit a Probenzusatzwert torsten@351: */ torsten@110: Ext.define('Lada.view.zusatzwerte.CreateForm', { torsten@110: extend: 'Lada.view.widgets.LadaForm', torsten@122: requires : [ raimund@478: 'Lada.view.widgets.Probenzusatzwert', raimund@478: 'Ext.layout.container.Column' torsten@122: ], raimund@491: torsten@110: model: 'Lada.model.Zusatzwert', raimund@491: torsten@110: initComponent: function() { raimund@491: this.items = [{ raimund@491: xtype: 'probenzusatzwert', raimund@491: name: 'pzsId', raimund@491: fieldLabel: 'PZW-Größe', raimund@491: listeners: { raimund@491: scope: this, raimund@491: 'change': function (field, newv, oldv, opts) { raimund@491: console.log(field, oldv, newv, opts); raimund@491: var ffield = this.getForm().findField("messeinheit"); raimund@491: pzsId = newv; raimund@491: if (pzsId == undefined) { raimund@491: pzsId = oldv; torsten@143: } raimund@491: ffield.setValue(this.model.getMesseinheit(pzsId)); torsten@143: } raimund@491: } raimund@491: }, { raimund@491: layout: "column", raimund@491: border: 0, raimund@491: items: [{ torsten@278: xtype: 'numberfield', raimund@491: name: 'messwertPzs', raimund@491: fieldLabel: 'Messwert' raimund@491: }, { raimund@491: xtype: 'displayfield', raimund@491: name: 'messeinheit' raimund@491: }] raimund@491: }, { raimund@491: xtype: 'numberfield', raimund@491: name: 'messfehler', raimund@491: fieldLabel: 'rel. Unsich.[%]' raimund@491: }, { raimund@491: xtype: 'numberfield', raimund@491: name: 'nwgZuMesswert', raimund@491: fieldLabel: 'Nachweisgrenze' raimund@491: }]; raimund@491: this.callParent(arguments); torsten@110: } torsten@110: }); torsten@143: