Mercurial > lada > lada-client
comparison app/view/grid/Messungen.js @ 566:8ebe4cfca4b8
Added a MessungenGridController. "Delete" causes a Code-500 Server Error.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 10 Mar 2015 11:54:02 +0100 |
parents | 83c0f476d825 |
children | 5af82dc8612d |
comparison
equal
deleted
inserted
replaced
565:83c0f476d825 | 566:8ebe4cfca4b8 |
---|---|
43 disabled: true | 43 disabled: true |
44 }, { | 44 }, { |
45 text: 'Hinzufügen', | 45 text: 'Hinzufügen', |
46 icon: 'resources/img/list-add.png', | 46 icon: 'resources/img/list-add.png', |
47 action: 'add', | 47 action: 'add', |
48 probeId: this.recordId | 48 probeId: this.probeId |
49 }, { | 49 }, { |
50 text: 'Löschen', | 50 text: 'Löschen', |
51 icon: 'resources/img/list-remove.png', | 51 icon: 'resources/img/list-remove.png', |
52 action: 'delete' | 52 action: 'delete' |
53 }] | 53 }] |
58 flex: 1, | 58 flex: 1, |
59 editor: { | 59 editor: { |
60 allowBlank: false | 60 allowBlank: false |
61 } | 61 } |
62 }, { | 62 }, { |
63 /* | |
64 header: 'Probe-ID', | |
65 dataIndex: 'probeId', | |
66 flex: 1, | |
67 editor: { | |
68 allowBlank: false | |
69 } | |
70 }, { | |
71 */ | |
72 header: 'Nebenproben-Nr.', | 63 header: 'Nebenproben-Nr.', |
73 dataIndex: 'nebenprobenNr', | 64 dataIndex: 'nebenprobenNr', |
74 flex: 1, | 65 flex: 1, |
75 editor: { | 66 editor: { |
76 allowBlank: false | 67 allowBlank: false |
92 format: 'd.m.Y', | 83 format: 'd.m.Y', |
93 //minValue: '01.01.2001', //todo: gibt es das? | 84 //minValue: '01.01.2001', //todo: gibt es das? |
94 //minText: 'Das Datum der Messung darf nicht vor dem 01.01.2001 liegen.', | 85 //minText: 'Das Datum der Messung darf nicht vor dem 01.01.2001 liegen.', |
95 maxValue: Ext.Date.format(new Date(), 'd.m.Y') | 86 maxValue: Ext.Date.format(new Date(), 'd.m.Y') |
96 } | 87 } |
97 } | |
98 /* | |
99 , { | |
100 header: 'Messdauer', | |
101 dataIndex: 'messdauer', | |
102 width: 50, | |
103 editor: { | |
104 allowBlank: false | |
105 } | |
106 }, { | 88 }, { |
107 header: 'Geplant', | |
108 dataIndex: 'geplant', | |
109 width: 10, | |
110 editor: { | |
111 xtype: 'checkboxfield', | |
112 allowBlank: false | |
113 } | |
114 }, { | |
115 header: 'Letzte Änderung', | |
116 dataIndex: 'letzteAenderung', | |
117 width: 50, | |
118 editor: { | |
119 xtype: 'datefield', | |
120 allowBlank: false, | |
121 format: 'd.m.Y', | |
122 //minValue: '01.01.2001', //todo: gibt es das? | |
123 //minText: 'Das Datum der letzten Änderung darf nicht vor dem 01.01.2001 liegen.', | |
124 maxValue: Ext.Date.format(new Date(), 'd.m.Y') | |
125 } | |
126 }*/ | |
127 , { | |
128 header: 'Status', | 89 header: 'Status', |
129 flex: 1, | 90 flex: 1, |
130 dataIndex: 'id', | 91 dataIndex: 'id', |
131 renderer: function(value) { | 92 renderer: function(value) { |
132 //fixme: dezeit existiert nur 1 status daher immer unbekannt | 93 //fixme: dezeit existiert nur 1 status daher immer unbekannt |
211 this.store.load({ | 172 this.store.load({ |
212 params: { | 173 params: { |
213 probeId: this.recordId | 174 probeId: this.recordId |
214 } | 175 } |
215 }); | 176 }); |
216 | |
217 /* | |
218 this.statusStore.load({ | |
219 params: { | |
220 messungId: this.recordId | |
221 } | |
222 }); | |
223 this.messwerteStore.load({ | |
224 params: { | |
225 messungId: this.recordId | |
226 } | |
227 }); | |
228 this.mKommentareStore.load({ | |
229 params: { | |
230 messungsId: this.recordId | |
231 } | |
232 }); | |
233 */ | |
234 | |
235 }, | |
236 listeners: { | |
237 selectionchange: function(model, selected, eOpts) { | |
238 /* | |
239 * Enable the 'details' button only when an item is selected | |
240 */ | |
241 if (selected.length > 0) { | |
242 this.down('button[action=open]').enable(); | |
243 } | |
244 } | |
245 } | 177 } |
246 }); | 178 }); |