Mercurial > lada > lada-client
comparison app/view/proben/CreateForm.js @ 67:7ea76e760fc2
Added CreateForm for proben
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 15:40:40 +0200 |
parents | |
children | a8619efdf3ae |
comparison
equal
deleted
inserted
replaced
66:fcb63271d1bd | 67:7ea76e760fc2 |
---|---|
1 Ext.define('Lada.view.proben.CreateForm', { | |
2 extend: 'Lada.view.widgets.LadaForm', | |
3 model: 'Lada.model.Probe', | |
4 | |
5 initComponent: function() { | |
6 this.items = [ | |
7 { | |
8 xtype: 'fieldset', | |
9 title: 'Probenangaben', | |
10 defaults: { | |
11 labelWidth: 150 | |
12 }, | |
13 items: [ | |
14 { | |
15 xtype: 'textfield', | |
16 name: 'mstId', | |
17 fieldLabel: 'Messstelle' | |
18 }, | |
19 { | |
20 xtype: 'textfield', | |
21 name: 'hauptprobenNr', | |
22 fieldLabel: 'Hauptprobennr.' | |
23 }, | |
24 { | |
25 xtype: 'textfield', | |
26 name: 'probeId', | |
27 fieldLabel: 'Probe-ID' | |
28 }, | |
29 { | |
30 xtype: 'fieldset', | |
31 title: 'Erweiterte Probenangaben', | |
32 collapsible: true, | |
33 collapsed: true, | |
34 items: [ | |
35 { | |
36 xtype: 'datenbasis', | |
37 id: 'datenbasis', | |
38 editable: false, | |
39 name: 'datenbasisId', | |
40 fieldLabel: 'Datenbasis' | |
41 }, | |
42 { | |
43 xtype: 'betriebsart', | |
44 name: 'baId', | |
45 fieldLabel: 'Betriebsart' | |
46 }, | |
47 { | |
48 xtype: 'testdatensatz', | |
49 name: 'test', | |
50 fieldLabel: 'Testdatensatz' | |
51 }, | |
52 // TODO: Fix Probenart, Is sent as list which | |
53 // causes an error on server side. | |
54 //{ | |
55 // xtype: 'probenart', | |
56 // id: 'probenart', | |
57 // editable: false, | |
58 // name: 'probenartId', | |
59 // fieldLabel: 'Probenart' | |
60 //}, | |
61 { | |
62 xtype: 'textfield', | |
63 name: 'probenartId', | |
64 fieldLabel: 'Probennehmer' | |
65 }, | |
66 { | |
67 xtype: 'textfield', | |
68 name: 'x11', | |
69 fieldLabel: 'Datensatzerzeuger' | |
70 } | |
71 ] | |
72 } | |
73 ] | |
74 }, | |
75 // Medium | |
76 { | |
77 xtype: 'fieldset', | |
78 title: 'Medium', | |
79 defaults: { | |
80 labelWidth: 150 | |
81 }, | |
82 items: [ | |
83 { | |
84 xtype: 'uwb', | |
85 name: 'umwId', | |
86 fieldLabel: 'Umweltbereich' | |
87 }, | |
88 { | |
89 xtype: 'textfield', | |
90 name: 'media', | |
91 fieldLabel: 'Medienbezeichnung' | |
92 }, | |
93 { | |
94 xtype: 'textfield', | |
95 name: 'mediaDesk', | |
96 fieldLabel: 'Deskriptoren' | |
97 }, | |
98 { | |
99 xtype: 'fieldset', | |
100 title: 'Details Deskriptoren', | |
101 collapsible: true, | |
102 collapsed: true, | |
103 defaultType: 'textfield', | |
104 items: this.buildDescriptors() | |
105 } | |
106 ] | |
107 }, | |
108 // Zeit | |
109 { | |
110 xtype: 'fieldset', | |
111 title: 'Zeit', | |
112 defaultType: 'datefield', | |
113 defaults: { | |
114 labelWidth: 150 | |
115 }, | |
116 items: [ | |
117 { | |
118 fieldLabel: 'Probennahme Beginn', | |
119 name: 'probeentnahmeBeginn' | |
120 }, | |
121 { | |
122 fieldLabel: 'Probennahme Ende', | |
123 name: 'probeentnahmeEnde' | |
124 }, | |
125 { | |
126 fieldLabel: 'Sollzeit Von', | |
127 name: 'solldatumBeginn' | |
128 }, | |
129 { | |
130 fieldLabel: 'Sollzeit Bis', | |
131 name: 'solldatumEnde' | |
132 }, | |
133 { | |
134 fieldLabel: 'Ursprungszeit', | |
135 name: 'z5' | |
136 } | |
137 ] | |
138 } | |
139 ]; | |
140 //this.buttons = [ | |
141 // { | |
142 // text: 'Speichern', | |
143 // handler: this.commit, | |
144 // scope: this | |
145 // } | |
146 //]; | |
147 this.callParent(); | |
148 }, | |
149 buildDescriptors: function() { | |
150 var fields = new Array(); | |
151 for ($i=0; $i<12; $i++) { | |
152 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; | |
153 } | |
154 return fields; | |
155 } | |
156 }); |