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 raimund@497: * the documentation coming with IMIS-Labordaten-Application for details. torsten@472: */ torsten@472: torsten@348: /* torsten@348: * Formular to edit a Probe torsten@348: */ torsten@268: Ext.define('Lada.view.proben.EditForm', { torsten@71: extend: 'Lada.view.widgets.LadaForm', raimund@497: alias: 'widget.probeneditform', torsten@121: requires: [ torsten@121: 'Lada.view.widgets.Datenbasis', torsten@121: 'Lada.view.widgets.Netzbetreiber', torsten@121: 'Lada.view.widgets.Betriebsart', torsten@121: 'Lada.view.widgets.Testdatensatz', torsten@121: 'Lada.view.widgets.Probenart', torsten@122: 'Lada.view.widgets.Uwb', torsten@144: 'Lada.view.zusatzwerte.List', torsten@150: 'Lada.view.kommentare.List', torsten@160: 'Lada.view.orte.List', torsten@160: 'Lada.view.messungen.List' torsten@121: ], raimund@497: torsten@71: model: 'Lada.model.Probe', torsten@71: torsten@71: initComponent: function() { raimund@497: this.items = [{ raimund@491: xtype: 'fieldset', raimund@491: title: 'Probenangaben', raimund@491: defaults: { raimund@491: labelWidth: 150 torsten@71: }, raimund@491: items: [{ raimund@491: xtype: 'mst', raimund@491: name: 'mstId', raimund@491: fieldLabel: 'Messstelle', raimund@491: allowBlank: false raimund@491: }, { raimund@491: xtype: 'textfield', raimund@491: name: 'hauptprobenNr', raimund@491: maxLength: 20, raimund@491: fieldLabel: 'Hauptprobennr.' raimund@491: }, { torsten@71: xtype: 'fieldset', raimund@491: title: 'Erweiterte Probenangaben', torsten@122: collapsible: true, torsten@122: collapsed: true, raimund@491: items: [{ raimund@491: xtype: 'datenbasis', raimund@491: id: 'datenbasis', raimund@491: editable: false, raimund@491: name: 'datenbasisId', raimund@491: fieldLabel: 'Datenbasis' raimund@491: }, { raimund@491: xtype: 'betriebsart', raimund@491: name: 'baId', raimund@491: fieldLabel: 'Betriebsart' raimund@491: }, { raimund@491: xtype: 'testdatensatz', raimund@491: name: 'test', raimund@491: fieldLabel: 'Testdatensatz', raimund@491: allowBlank: false raimund@491: }, { raimund@491: xtype: 'probenart', raimund@491: id: 'probenart', raimund@491: editable: false, raimund@491: name: 'probenartId', raimund@491: fieldLabel: 'Probenart', raimund@491: allowBlank: false raimund@491: }, { raimund@491: xtype: 'numberfield', raimund@491: allowDecimals: false, raimund@491: name: 'probeNehmerId', raimund@491: fieldLabel: 'Probennehmer' raimund@491: }, { raimund@491: xtype: 'netzbetreiber', raimund@491: name: 'netzbetreiberId', raimund@491: editable: false, raimund@491: fieldLabel: 'Netzbetreiber', raimund@491: allowBlank: false raimund@491: }, { raimund@491: xtype: 'textfield', raimund@491: name: 'x11', raimund@491: fieldLabel: 'Datensatzerzeuger' raimund@491: }] raimund@491: }] raimund@491: }, { raimund@491: // Medium raimund@491: xtype: 'fieldset', raimund@491: title: 'Medium', raimund@491: defaults: { raimund@491: labelWidth: 150 torsten@144: }, raimund@491: items: [{ raimund@491: xtype: 'uwb', raimund@491: name: 'umwId', raimund@491: fieldLabel: 'Umweltbereich', raimund@491: allowBlank: false raimund@491: }, { raimund@491: xtype: 'textfield', raimund@491: maxLength: 100, raimund@491: name: 'media', raimund@491: fieldLabel: 'Medienbezeichnung' raimund@491: }, { raimund@491: xtype: 'textfield', raimund@491: maxLength: 100, raimund@491: name: 'mediaDesk', raimund@491: fieldLabel: 'Deskriptoren' raimund@491: }, { torsten@144: xtype: 'fieldset', raimund@491: title: 'Details Deskriptoren', torsten@144: collapsible: true, torsten@144: collapsed: true, raimund@491: defaultType: 'textfield', raimund@491: items: this.buildDescriptors() raimund@491: }] raimund@491: }, { raimund@491: // Zeit raimund@491: xtype: 'fieldset', raimund@491: title: 'Zeit', raimund@491: defaultType: 'datetime', raimund@491: defaults: { raimund@491: labelWidth: 150 torsten@160: }, raimund@491: items: [{ raimund@491: fieldLabel: 'Probennahme Beginn', raimund@491: name: 'probeentnahmeBeginn' raimund@491: }, { raimund@491: fieldLabel: 'Probennahme Ende', raimund@491: name: 'probeentnahmeEnde' raimund@491: }, { raimund@491: fieldLabel: 'Sollzeit Von', raimund@491: name: 'solldatumBeginn' raimund@491: }, { raimund@491: fieldLabel: 'Sollzeit Bis', raimund@491: name: 'solldatumEnde' raimund@491: }] raimund@491: }, { raimund@491: // Ortsangaben raimund@491: xtype: 'fieldset', raimund@491: title: 'Ortsangaben', raimund@491: padding: '10 10', raimund@491: items: [{ raimund@491: xtype: 'ortelist', raimund@491: probeId: this.modelId raimund@491: }] raimund@491: }, { raimund@491: // Probenzusatzwerte raimund@491: xtype: 'fieldset', raimund@491: title: 'Probenzusatzwerte', raimund@491: collapsible: true, raimund@491: collapsed: true, raimund@491: padding: '10 10', raimund@491: items: [{ raimund@491: xtype: 'zusatzwertelist', raimund@491: probeId: this.modelId raimund@491: }] raimund@491: }, { raimund@491: // Probenkommentar raimund@491: xtype: 'fieldset', raimund@491: title: 'Probenkommentare', raimund@491: collapsible: true, raimund@491: collapsed: true, raimund@491: padding: '10 10', raimund@491: items: [{ raimund@491: xtype: 'kommentarelist', raimund@491: probeId: this.modelId raimund@491: }] raimund@491: }, { torsten@160: // Messungsangaben raimund@491: xtype: 'fieldset', raimund@491: title: 'Messungsangaben', raimund@491: padding: '10 10', raimund@491: items: [{ raimund@491: xtype: 'messungenlist', raimund@491: probeId: this.modelId raimund@491: }] raimund@491: }]; raimund@491: this.callParent(arguments); torsten@71: }, raimund@491: torsten@71: buildDescriptors: function() { raimund@497: var fields = []; raimund@497: for (var i = 0; i < 12; i++) { raimund@497: fields[i] = { raimund@497: fieldLabel: 'S' + i, name: 's' + i raimund@497: }; torsten@71: } torsten@71: return fields; torsten@71: } torsten@71: });