Mercurial > lada > lada-client
comparison app/view/proben/CreateForm.js @ 491:850ccfe5f3c4
Code style.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 23:23:32 +0100 |
parents | debfcc7713e3 |
children | 7c0653e8d9f7 |
comparison
equal
deleted
inserted
replaced
490:446e99cfd425 | 491:850ccfe5f3c4 |
---|---|
19 'Lada.view.widgets.Probenart', | 19 'Lada.view.widgets.Probenart', |
20 'Lada.view.widgets.Uwb' | 20 'Lada.view.widgets.Uwb' |
21 ], | 21 ], |
22 model: 'Lada.model.Probe', | 22 model: 'Lada.model.Probe', |
23 initComponent: function() { | 23 initComponent: function() { |
24 this.items = [ | 24 this.items = [{ |
25 { | 25 xtype: 'fieldset', |
26 title: 'Probenangaben', | |
27 defaults: { | |
28 labelWidth: 150 | |
29 }, | |
30 items: [{ | |
31 xtype: 'mst', | |
32 name: 'mstId', | |
33 fieldLabel: 'Messstelle', | |
34 allowBlank: false | |
35 }, { | |
36 xtype: 'textfield', | |
37 name: 'hauptprobenNr', | |
38 maxLength: 20, | |
39 fieldLabel: 'Hauptprobennr.' | |
40 }, { | |
26 xtype: 'fieldset', | 41 xtype: 'fieldset', |
27 title: 'Probenangaben', | 42 title: 'Erweiterte Probenangaben', |
28 defaults: { | 43 collapsible: true, |
29 labelWidth: 150 | 44 collapsed: false, |
30 }, | 45 items: [{ |
31 items: [ | 46 xtype: 'datenbasis', |
32 { | 47 id: 'datenbasis', |
33 xtype: 'mst', | 48 editable: false, |
34 name: 'mstId', | 49 name: 'datenbasisId', |
35 fieldLabel: 'Messstelle', | 50 fieldLabel: 'Datenbasis' |
36 allowBlank: false | 51 }, { |
37 }, | 52 xtype: 'betriebsart', |
38 { | 53 name: 'baId', |
39 xtype: 'textfield', | 54 fieldLabel: 'Betriebsart' |
40 name: 'hauptprobenNr', | 55 }, { |
41 maxLength: 20, | 56 xtype: 'testdatensatz', |
42 fieldLabel: 'Hauptprobennr.' | 57 name: 'test', |
43 }, | 58 fieldLabel: 'Testdatensatz', |
44 { | 59 allowBlank: false |
45 xtype: 'fieldset', | 60 }, { |
46 title: 'Erweiterte Probenangaben', | 61 xtype: 'probenart', |
47 collapsible: true, | 62 id: 'probenart', |
48 collapsed: false, | 63 editable: false, |
49 items: [ | 64 name: 'probenartId', |
50 { | 65 fieldLabel: 'Probenart', |
51 xtype: 'datenbasis', | 66 allowBlank: false |
52 id: 'datenbasis', | 67 }, { |
53 editable: false, | 68 xtype: 'numberfield', |
54 name: 'datenbasisId', | 69 allowDecimals: false, |
55 fieldLabel: 'Datenbasis' | 70 name: 'probeNehmerId', |
56 }, | 71 fieldLabel: 'Probennehmer' |
57 { | 72 }, { |
58 xtype: 'betriebsart', | 73 xtype: 'netzbetreiber', |
59 name: 'baId', | 74 name: 'netzbetreiberId', |
60 fieldLabel: 'Betriebsart' | 75 fieldLabel: 'Netzbetreiber', |
61 }, | 76 editable: false, |
62 { | 77 allowBlank: false |
63 xtype: 'testdatensatz', | 78 }] |
64 name: 'test', | 79 }] |
65 fieldLabel: 'Testdatensatz', | 80 }, { |
66 allowBlank: false | 81 // Medium |
67 }, | 82 xtype: 'fieldset', |
68 { | 83 title: 'Medium', |
69 xtype: 'probenart', | 84 defaults: { |
70 id: 'probenart', | 85 labelWidth: 150 |
71 editable: false, | |
72 name: 'probenartId', | |
73 fieldLabel: 'Probenart', | |
74 allowBlank: false | |
75 }, | |
76 { | |
77 xtype: 'numberfield', | |
78 allowDecimals: false, | |
79 name: 'probeNehmerId', | |
80 fieldLabel: 'Probennehmer' | |
81 }, | |
82 { | |
83 xtype: 'netzbetreiber', | |
84 name: 'netzbetreiberId', | |
85 fieldLabel: 'Netzbetreiber', | |
86 editable: false, | |
87 allowBlank: false | |
88 } | |
89 ] | |
90 } | |
91 ] | |
92 }, | 86 }, |
93 // Medium | 87 items: [{ |
94 { | 88 xtype: 'uwb', |
89 name: 'umwId', | |
90 fieldLabel: 'Umweltbereich', | |
91 allowBlank: false | |
92 }, { | |
93 xtype: 'textfield', | |
94 maxLength: 100, | |
95 name: 'media', | |
96 fieldLabel: 'Medienbezeichnung' | |
97 }, { | |
98 xtype: 'textfield', | |
99 maxLength: 100, | |
100 name: 'mediaDesk', | |
101 fieldLabel: 'Deskriptoren' | |
102 }, { | |
95 xtype: 'fieldset', | 103 xtype: 'fieldset', |
96 title: 'Medium', | 104 title: 'Details Deskriptoren', |
97 defaults: { | 105 collapsible: true, |
98 labelWidth: 150 | 106 collapsed: true, |
99 }, | 107 defaultType: 'textfield', |
100 items: [ | 108 items: this.buildDescriptors() |
101 { | 109 }] |
102 xtype: 'uwb', | 110 }, { |
103 name: 'umwId', | 111 // Zeit |
104 fieldLabel: 'Umweltbereich', | 112 xtype: 'fieldset', |
105 allowBlank: false | 113 title: 'Zeit', |
106 }, | 114 defaultType: 'datetime', |
107 { | 115 defaults: { |
108 xtype: 'textfield', | 116 labelWidth: 150 |
109 maxLength: 100, | |
110 name: 'media', | |
111 fieldLabel: 'Medienbezeichnung' | |
112 }, | |
113 { | |
114 xtype: 'textfield', | |
115 maxLength: 100, | |
116 name: 'mediaDesk', | |
117 fieldLabel: 'Deskriptoren' | |
118 }, | |
119 { | |
120 xtype: 'fieldset', | |
121 title: 'Details Deskriptoren', | |
122 collapsible: true, | |
123 collapsed: true, | |
124 defaultType: 'textfield', | |
125 items: this.buildDescriptors() | |
126 } | |
127 ] | |
128 }, | 117 }, |
129 // Zeit | 118 items: [{ |
130 { | 119 fieldLabel: 'Probennahme Beginn', |
131 xtype: 'fieldset', | 120 name: 'probeentnahmeBeginn' |
132 title: 'Zeit', | 121 }, { |
133 defaultType: 'datetime', | 122 fieldLabel: 'Probennahme Ende', |
134 defaults: { | 123 name: 'probeentnahmeEnde' |
135 labelWidth: 150 | 124 }, { |
136 }, | 125 fieldLabel: 'Sollzeit Von', |
137 items: [ | 126 name: 'solldatumBeginn' |
138 { | 127 }, { |
139 fieldLabel: 'Probennahme Beginn', | 128 fieldLabel: 'Sollzeit Bis', |
140 name: 'probeentnahmeBeginn' | 129 name: 'solldatumEnde' |
141 }, | 130 }] |
142 { | 131 }]; |
143 fieldLabel: 'Probennahme Ende', | 132 this.callParent(arguments); |
144 name: 'probeentnahmeEnde' | |
145 }, | |
146 { | |
147 fieldLabel: 'Sollzeit Von', | |
148 name: 'solldatumBeginn' | |
149 }, | |
150 { | |
151 fieldLabel: 'Sollzeit Bis', | |
152 name: 'solldatumEnde' | |
153 } | |
154 ] | |
155 } | |
156 ]; | |
157 this.callParent(); | |
158 }, | 133 }, |
134 | |
159 buildDescriptors: function() { | 135 buildDescriptors: function() { |
160 var fields = new Array(); | 136 var fields = new Array(); |
161 for ($i=0; $i<12; $i++) { | 137 for ($i=0; $i<12; $i++) { |
162 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; | 138 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; |
163 } | 139 } |