comparison app/view/proben/Edit.js @ 503:369917727c86

Refactored proben edit window.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 11 Dec 2014 18:54:21 +0100
parents 8b4ec61c5752
children 44e054626bdd
comparison
equal deleted inserted replaced
502:484e12e89d54 503:369917727c86
21 // Make size of the dialog dependend of the available space. 21 // Make size of the dialog dependend of the available space.
22 // TODO: Handle resizing the browser window. 22 // TODO: Handle resizing the browser window.
23 autoShow: true, 23 autoShow: true,
24 autoScroll: true, 24 autoScroll: true,
25 modal: true, 25 modal: true,
26 layout: 'fit',
26 27
27 initComponent: function() { 28 initComponent: function() {
28 this.buttons = [{ 29 this.buttons = [{
29 text: 'Speichern', 30 text: 'Speichern',
30 action: 'save' 31 action: 'save'
31 }, { 32 }, {
32 text: 'Abbrechen', 33 text: 'Abbrechen',
33 scope: this, 34 scope: this,
34 handler: this.close 35 handler: this.close
35 }]; 36 }];
36 this.width = Ext.getBody().getViewSize().width - 30; 37 this.width = 700// Ext.getBody().getViewSize().width - 30;
37 this.height = Ext.getBody().getViewSize().height - 30; 38 this.height = Ext.getBody().getViewSize().height - 30;
38 // InitialConfig is the config object passed to the constructor on 39 // InitialConfig is the config object passed to the constructor on
39 // creation of this window. We need to pass it throuh to the form as 40 // creation of this window. We need to pass it throuh to the form as
40 // we need the "modelId" param to load the correct item. 41 // we need the "modelId" param to load the correct item.
42
43 /*
44 this.items = [{
45 xtype: 'fieldset',
46 title: 'Probenangaben',
47 layout: 'hbox',
48 defaults: {
49 labelWidth: 150
50 },
51 items: [{
52 layout: 'vbox',
53 border: 0,
54 items: [{
55 xtype: 'mst',
56 name: 'mstId',
57 fieldLabel: 'Messstelle',
58 allowBlank: false
59 }, {
60 xtype: 'textfield',
61 name: 'hauptprobenNr',
62 maxLength: 20,
63 fieldLabel: 'Hauptprobennr.'
64 }]
65 }]
66 */
67 /*
68 items: [{
69 layout: 'hbox',
70 border: 0,
71 items: [{
72 layout: 'vbox',
73 border: 0,
74 items: [{
75 xtype: 'mst',
76 name: 'mstId',
77 fieldLabel: 'Messstelle',
78 allowBlank: false
79 }, {
80 xtype: 'textfield',
81 name: 'hauptprobenNr',
82 maxLength: 20,
83 fieldLabel: 'Hauptprobennr.'
84 }]
85 }, {
86 xtype: 'fieldset',
87 title: 'Erweiterte Probenangaben',
88 collapsible: true,
89 collapsed: true,
90 items: [{
91 xtype: 'datenbasis',
92 id: 'datenbasis',
93 editable: false,
94 name: 'datenbasisId',
95 fieldLabel: 'Datenbasis'
96 }, {
97 xtype: 'betriebsart',
98 name: 'baId',
99 fieldLabel: 'Betriebsart'
100 }, {
101 xtype: 'testdatensatz',
102 name: 'test',
103 fieldLabel: 'Testdatensatz',
104 allowBlank: false
105 }, {
106 xtype: 'probenart',
107 id: 'probenart',
108 editable: false,
109 name: 'probenartId',
110 fieldLabel: 'Probenart',
111 allowBlank: false
112 }, {
113 xtype: 'numberfield',
114 allowDecimals: false,
115 name: 'probeNehmerId',
116 fieldLabel: 'Probennehmer'
117 }, {
118 xtype: 'netzbetreiber',
119 name: 'netzbetreiberId',
120 editable: false,
121 fieldLabel: 'Netzbetreiber',
122 allowBlank: false
123 }, {
124 xtype: 'textfield',
125 name: 'x11',
126 fieldLabel: 'Datensatzerzeuger'
127 }]
128 }]
129 }]
130 */
131 // }];
41 var form = Ext.create('Lada.view.proben.EditForm', 132 var form = Ext.create('Lada.view.proben.EditForm',
42 this.initialConfig); 133 this.initialConfig);
43 this.items = [form]; 134 this.items = [{
44 this.callParent(); 135 border: 0,
136 autoScroll: true,
137 items: [form]
138 }];
139 this.callParent(arguments);
45 } 140 }
46 }); 141 });

http://lada.wald.intevation.org