annotate app/view/proben/CreateForm.js @ 497:7c0653e8d9f7

Fixed some js related issues (unused vars, arrays, etc.) and code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 10:38:17 +0100
parents 850ccfe5f3c4
children c1b77fb96b01
rev   line source
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
2 * Software engineering by Intevation GmbH
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
3 *
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
7 */
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
8
348
6007d11b81c2 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 278
diff changeset
9 /*
6007d11b81c2 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 278
diff changeset
10 * Formular to create a Probe
6007d11b81c2 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 278
diff changeset
11 */
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.proben.CreateForm', {
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 extend: 'Lada.view.widgets.LadaForm',
121
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
14 requires: [
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
15 'Lada.view.widgets.Datenbasis',
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
16 'Lada.view.widgets.Netzbetreiber',
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
17 'Lada.view.widgets.Betriebsart',
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
18 'Lada.view.widgets.Testdatensatz',
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
19 'Lada.view.widgets.Probenart',
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
20 'Lada.view.widgets.Uwb'
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
21 ],
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
22
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 model: 'Lada.model.Probe',
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
24
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 initComponent: function() {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
26 this.items = [{
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
27 xtype: 'fieldset',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
28 title: 'Probenangaben',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
29 defaults: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
30 labelWidth: 150
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
31 },
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
32 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
33 xtype: 'mst',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
34 name: 'mstId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
35 fieldLabel: 'Messstelle',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
36 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
37 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
38 xtype: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
39 name: 'hauptprobenNr',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
40 maxLength: 20,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
41 fieldLabel: 'Hauptprobennr.'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
42 }, {
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
43 xtype: 'fieldset',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
44 title: 'Erweiterte Probenangaben',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
45 collapsible: true,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
46 collapsed: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
47 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
48 xtype: 'datenbasis',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
49 id: 'datenbasis',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
50 editable: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
51 name: 'datenbasisId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
52 fieldLabel: 'Datenbasis'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
53 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
54 xtype: 'betriebsart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
55 name: 'baId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
56 fieldLabel: 'Betriebsart'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
57 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
58 xtype: 'testdatensatz',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
59 name: 'test',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
60 fieldLabel: 'Testdatensatz',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
61 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
62 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
63 xtype: 'probenart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
64 id: 'probenart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
65 editable: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
66 name: 'probenartId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
67 fieldLabel: 'Probenart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
68 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
69 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
70 xtype: 'numberfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
71 allowDecimals: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
72 name: 'probeNehmerId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
73 fieldLabel: 'Probennehmer'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
74 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
75 xtype: 'netzbetreiber',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
76 name: 'netzbetreiberId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
77 fieldLabel: 'Netzbetreiber',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
78 editable: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
79 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
80 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
81 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
82 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
83 // Medium
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
84 xtype: 'fieldset',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
85 title: 'Medium',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
86 defaults: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
87 labelWidth: 150
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
88 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
89 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
90 xtype: 'uwb',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
91 name: 'umwId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
92 fieldLabel: 'Umweltbereich',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
93 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
94 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
95 xtype: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
96 maxLength: 100,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
97 name: 'media',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
98 fieldLabel: 'Medienbezeichnung'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
99 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
100 xtype: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
101 maxLength: 100,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
102 name: 'mediaDesk',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
103 fieldLabel: 'Deskriptoren'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
104 }, {
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
105 xtype: 'fieldset',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
106 title: 'Details Deskriptoren',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
107 collapsible: true,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
108 collapsed: true,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
109 defaultType: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
110 items: this.buildDescriptors()
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
111 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
112 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
113 // Zeit
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
114 xtype: 'fieldset',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
115 title: 'Zeit',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
116 defaultType: 'datetime',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
117 defaults: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
118 labelWidth: 150
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
119 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
120 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
121 fieldLabel: 'Probennahme Beginn',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
122 name: 'probeentnahmeBeginn'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
123 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
124 fieldLabel: 'Probennahme Ende',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
125 name: 'probeentnahmeEnde'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
126 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
127 fieldLabel: 'Sollzeit Von',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
128 name: 'solldatumBeginn'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
129 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
130 fieldLabel: 'Sollzeit Bis',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
131 name: 'solldatumEnde'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
132 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
133 }];
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
134 this.callParent(arguments);
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
135 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
136
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
137 buildDescriptors: function() {
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
138 var fields = [];
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
139 for (var i = 0; i < 12; i++) {
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
140 fields[i] = {
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
141 fieldLabel: 'S' + i, name: 's' + i
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
142 };
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
143 }
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
144 return fields;
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
145 }
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
146 });

http://lada.wald.intevation.org