Mercurial > lada > lada-client
changeset 67:7ea76e760fc2
Added CreateForm for proben
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 15:40:40 +0200 |
parents | fcb63271d1bd |
children | e54cb2f3566e |
files | app/view/proben/CreateForm.js |
diffstat | 1 files changed, 156 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/proben/CreateForm.js Wed Jun 05 15:40:40 2013 +0200 @@ -0,0 +1,156 @@ +Ext.define('Lada.view.proben.CreateForm', { + extend: 'Lada.view.widgets.LadaForm', + model: 'Lada.model.Probe', + + initComponent: function() { + this.items = [ + { + xtype: 'fieldset', + title: 'Probenangaben', + defaults: { + labelWidth: 150 + }, + items: [ + { + xtype: 'textfield', + name: 'mstId', + fieldLabel: 'Messstelle' + }, + { + xtype: 'textfield', + name: 'hauptprobenNr', + fieldLabel: 'Hauptprobennr.' + }, + { + xtype: 'textfield', + name: 'probeId', + fieldLabel: 'Probe-ID' + }, + { + xtype: 'fieldset', + title: 'Erweiterte Probenangaben', + collapsible: true, + collapsed: true, + items: [ + { + xtype: 'datenbasis', + id: 'datenbasis', + editable: false, + name: 'datenbasisId', + fieldLabel: 'Datenbasis' + }, + { + xtype: 'betriebsart', + name: 'baId', + fieldLabel: 'Betriebsart' + }, + { + xtype: 'testdatensatz', + name: 'test', + fieldLabel: 'Testdatensatz' + }, + // TODO: Fix Probenart, Is sent as list which + // causes an error on server side. + //{ + // xtype: 'probenart', + // id: 'probenart', + // editable: false, + // name: 'probenartId', + // fieldLabel: 'Probenart' + //}, + { + xtype: 'textfield', + name: 'probenartId', + fieldLabel: 'Probennehmer' + }, + { + xtype: 'textfield', + name: 'x11', + fieldLabel: 'Datensatzerzeuger' + } + ] + } + ] + }, + // Medium + { + xtype: 'fieldset', + title: 'Medium', + defaults: { + labelWidth: 150 + }, + items: [ + { + xtype: 'uwb', + name: 'umwId', + fieldLabel: 'Umweltbereich' + }, + { + xtype: 'textfield', + name: 'media', + fieldLabel: 'Medienbezeichnung' + }, + { + xtype: 'textfield', + name: 'mediaDesk', + fieldLabel: 'Deskriptoren' + }, + { + xtype: 'fieldset', + title: 'Details Deskriptoren', + collapsible: true, + collapsed: true, + defaultType: 'textfield', + items: this.buildDescriptors() + } + ] + }, + // Zeit + { + xtype: 'fieldset', + title: 'Zeit', + defaultType: 'datefield', + defaults: { + labelWidth: 150 + }, + items: [ + { + fieldLabel: 'Probennahme Beginn', + name: 'probeentnahmeBeginn' + }, + { + fieldLabel: 'Probennahme Ende', + name: 'probeentnahmeEnde' + }, + { + fieldLabel: 'Sollzeit Von', + name: 'solldatumBeginn' + }, + { + fieldLabel: 'Sollzeit Bis', + name: 'solldatumEnde' + }, + { + fieldLabel: 'Ursprungszeit', + name: 'z5' + } + ] + } + ]; + //this.buttons = [ + // { + // text: 'Speichern', + // handler: this.commit, + // scope: this + // } + //]; + this.callParent(); + }, + buildDescriptors: function() { + var fields = new Array(); + for ($i=0; $i<12; $i++) { + fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; + } + return fields; + } +});