# HG changeset patch # User Torsten Irländer # Date 1370439640 -7200 # Node ID 7ea76e760fc27ba46565a2deaad39ec5c2ed979d # Parent fcb63271d1bd64aedd9285e11b9c65bce0ee3c37 Added CreateForm for proben diff -r fcb63271d1bd -r 7ea76e760fc2 app/view/proben/CreateForm.js --- /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; + } +});