annotate app/view/proben/CreateForm.js @ 495:649bf1d08531

Use extjs dev with all classes and css from extjs resources for development.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 03 Nov 2014 12:12:24 +0100
parents 850ccfe5f3c4
children 7c0653e8d9f7
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
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 348
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
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 ],
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 model: 'Lada.model.Probe',
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 initComponent: function() {
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
24 this.items = [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
25 xtype: 'fieldset',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
26 title: 'Probenangaben',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
27 defaults: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
28 labelWidth: 150
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
29 },
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
30 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
31 xtype: 'mst',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
32 name: 'mstId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
33 fieldLabel: 'Messstelle',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
34 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
35 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
36 xtype: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
37 name: 'hauptprobenNr',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
38 maxLength: 20,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
39 fieldLabel: 'Hauptprobennr.'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
40 }, {
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
41 xtype: 'fieldset',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
42 title: 'Erweiterte Probenangaben',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
43 collapsible: true,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
44 collapsed: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
45 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
46 xtype: 'datenbasis',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
47 id: 'datenbasis',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
48 editable: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
49 name: 'datenbasisId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
50 fieldLabel: 'Datenbasis'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
51 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
52 xtype: 'betriebsart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
53 name: 'baId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
54 fieldLabel: 'Betriebsart'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
55 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
56 xtype: 'testdatensatz',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
57 name: 'test',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
58 fieldLabel: 'Testdatensatz',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
59 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
60 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
61 xtype: 'probenart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
62 id: 'probenart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
63 editable: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
64 name: 'probenartId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
65 fieldLabel: 'Probenart',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
66 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
67 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
68 xtype: 'numberfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
69 allowDecimals: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
70 name: 'probeNehmerId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
71 fieldLabel: 'Probennehmer'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
72 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
73 xtype: 'netzbetreiber',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
74 name: 'netzbetreiberId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
75 fieldLabel: 'Netzbetreiber',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
76 editable: false,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
77 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
78 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
79 }]
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 // Medium
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
82 xtype: 'fieldset',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
83 title: 'Medium',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
84 defaults: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
85 labelWidth: 150
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
86 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
87 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
88 xtype: 'uwb',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
89 name: 'umwId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
90 fieldLabel: 'Umweltbereich',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
91 allowBlank: false
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
92 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
93 xtype: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
94 maxLength: 100,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
95 name: 'media',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
96 fieldLabel: 'Medienbezeichnung'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
97 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
98 xtype: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
99 maxLength: 100,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
100 name: 'mediaDesk',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
101 fieldLabel: 'Deskriptoren'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
102 }, {
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
103 xtype: 'fieldset',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
104 title: 'Details Deskriptoren',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
105 collapsible: true,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
106 collapsed: true,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
107 defaultType: 'textfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
108 items: this.buildDescriptors()
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
109 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
110 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
111 // Zeit
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
112 xtype: 'fieldset',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
113 title: 'Zeit',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
114 defaultType: 'datetime',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
115 defaults: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
116 labelWidth: 150
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
117 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
118 items: [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
119 fieldLabel: 'Probennahme Beginn',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
120 name: 'probeentnahmeBeginn'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
121 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
122 fieldLabel: 'Probennahme Ende',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
123 name: 'probeentnahmeEnde'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
124 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
125 fieldLabel: 'Sollzeit Von',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
126 name: 'solldatumBeginn'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
127 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
128 fieldLabel: 'Sollzeit Bis',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
129 name: 'solldatumEnde'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
130 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
131 }];
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
132 this.callParent(arguments);
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
133 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
134
67
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
135 buildDescriptors: function() {
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
136 var fields = new Array();
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
137 for ($i=0; $i<12; $i++) {
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
138 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i};
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
139 }
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
140 return fields;
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
141 }
7ea76e760fc2 Added CreateForm for proben
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
142 });

http://lada.wald.intevation.org