Mercurial > lada > lada-client
comparison app/view/proben/Create.js @ 65:9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
values.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 31 May 2013 17:40:56 +0200 |
parents | |
children | e54cb2f3566e |
comparison
equal
deleted
inserted
replaced
64:a4a24e737deb | 65:9e2e09e819fd |
---|---|
1 Ext.define('Lada.view.proben.Create', { | |
2 extend: 'Ext.window.Window', | |
3 alias: 'widget.probencreate', | |
4 | |
5 title: 'Maske für §3-Proben', | |
6 // Make size of the dialog dependend of the available space. | |
7 // TODO: Handle resizing the browser window. | |
8 width: Ext.getBody().getViewSize().width - 30, | |
9 height: Ext.getBody().getViewSize().height - 30, | |
10 autoShow: true, | |
11 autoScroll: true, | |
12 modal: true, | |
13 | |
14 requires: [ | |
15 'Lada.view.widgets.Uwb', | |
16 'Lada.view.widgets.Datenbasis', | |
17 'Lada.view.widgets.Probenart', | |
18 'Lada.view.widgets.Betriebsart', | |
19 'Lada.view.widgets.Testdatensatz' | |
20 ], | |
21 | |
22 initComponent: function() { | |
23 this.items = [ | |
24 { | |
25 //Define the form | |
26 xtype: 'form', | |
27 bodyPadding: '10 10', | |
28 border: 0, | |
29 items: [ | |
30 // Probenangaben | |
31 { | |
32 xtype: 'fieldset', | |
33 title: 'Probenangaben', | |
34 defaults: { | |
35 labelWidth: 150 | |
36 }, | |
37 items: [ | |
38 { | |
39 xtype: 'textfield', | |
40 name: 'mstId', | |
41 fieldLabel: 'Messstelle' | |
42 }, | |
43 { | |
44 xtype: 'textfield', | |
45 name: 'hauptprobenNr', | |
46 fieldLabel: 'Hauptprobennr.' | |
47 }, | |
48 { | |
49 xtype: 'textfield', | |
50 name: 'probeId', | |
51 fieldLabel: 'Probe-ID' | |
52 }, | |
53 { | |
54 xtype: 'fieldset', | |
55 title: 'Erweiterte Probenangaben', | |
56 collapsible: true, | |
57 collapsed: false, | |
58 items: [ | |
59 { | |
60 xtype: 'datenbasis', | |
61 id: 'datenbasis', | |
62 editable: false, | |
63 name: 'datenbasisId', | |
64 fieldLabel: 'Datenbasis' | |
65 }, | |
66 { | |
67 xtype: 'betriebsart', | |
68 name: 'baId', | |
69 fieldLabel: 'Betriebsart' | |
70 }, | |
71 { | |
72 xtype: 'testdatensatz', | |
73 name: 'test', | |
74 fieldLabel: 'Testdatensatz' | |
75 }, | |
76 { | |
77 xtype: 'probenart', | |
78 id: 'probenart', | |
79 editable: false, | |
80 name: 'probenartId', | |
81 fieldLabel: 'Probenart' | |
82 }, | |
83 { | |
84 xtype: 'textfield', | |
85 name: 'probenartId', | |
86 fieldLabel: 'Probennehmer' | |
87 }, | |
88 { | |
89 xtype: 'textfield', | |
90 name: 'x11', | |
91 fieldLabel: 'Datensatzerzeuger' | |
92 } | |
93 ] | |
94 } | |
95 ] | |
96 }, | |
97 // Medium | |
98 { | |
99 xtype: 'fieldset', | |
100 title: 'Medium', | |
101 defaults: { | |
102 labelWidth: 150 | |
103 }, | |
104 items: [ | |
105 { | |
106 xtype: 'uwb', | |
107 name: 'umwId', | |
108 fieldLabel: 'Umweltbereich' | |
109 }, | |
110 { | |
111 xtype: 'textfield', | |
112 name: 'media', | |
113 fieldLabel: 'Medienbezeichnung' | |
114 }, | |
115 { | |
116 xtype: 'textfield', | |
117 name: 'mediaDesk', | |
118 fieldLabel: 'Deskriptoren' | |
119 }, | |
120 { | |
121 xtype: 'fieldset', | |
122 title: 'Details Deskriptoren', | |
123 collapsible: true, | |
124 collapsed: true, | |
125 defaultType: 'textfield', | |
126 items: this.buildDescriptors() | |
127 } | |
128 ] | |
129 }, | |
130 // Zeit | |
131 { | |
132 xtype: 'fieldset', | |
133 title: 'Zeit', | |
134 defaultType: 'datefield', | |
135 defaults: { | |
136 labelWidth: 150 | |
137 }, | |
138 items: [ | |
139 { | |
140 fieldLabel: 'Probennahme Beginn', | |
141 name: 'probeentnahmeBeginn' | |
142 }, | |
143 { | |
144 fieldLabel: 'Probennahme Ende', | |
145 name: 'probeentnahmeEnde' | |
146 }, | |
147 { | |
148 fieldLabel: 'Sollzeit Von', | |
149 name: 'solldatumBeginn' | |
150 }, | |
151 { | |
152 fieldLabel: 'Sollzeit Bis', | |
153 name: 'solldatumEnde' | |
154 }, | |
155 { | |
156 fieldLabel: 'Ursprungszeit', | |
157 name: 'z5' | |
158 } | |
159 ] | |
160 } | |
161 ] | |
162 } | |
163 ]; | |
164 | |
165 this.buttons = [ | |
166 { | |
167 text: 'Speichern', | |
168 action: 'save' | |
169 }, | |
170 { | |
171 text: 'Verwerfen', | |
172 scope: this, | |
173 handler: this.close | |
174 } | |
175 ]; | |
176 this.callParent(arguments); | |
177 }, | |
178 buildDescriptors: function() { | |
179 var fields = new Array(); | |
180 for ($i=0; $i<12; $i++) { | |
181 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; | |
182 } | |
183 return fields; | |
184 } | |
185 }); | |
186 |