Mercurial > lada > lada-client
comparison app/view/window/MessungEdit.js @ 965:a2c2039bb5d9
Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 12 Nov 2015 14:25:07 +0100 |
parents | 8054232535ba |
children | bf7bb9583a40 |
comparison
equal
deleted
inserted
replaced
964:5b86baa038bc | 965:a2c2039bb5d9 |
---|---|
169 this.disableForm(); | 169 this.disableForm(); |
170 } | 170 } |
171 else { | 171 else { |
172 this.enableForm(); | 172 this.enableForm(); |
173 } | 173 } |
174 //Check if it is allowed to edit Status | |
175 if (this.record.get('statusEdit') === true) { | |
176 this.enableStatusEdit(); | |
177 } | |
178 else { | |
179 this.disableStatusEdit(); | |
180 } | |
174 }, | 181 }, |
175 scope: this | 182 scope: this |
176 }); | 183 }); |
177 }, | 184 }, |
178 | 185 |
198 * Disable the Chilelements of this window | 205 * Disable the Chilelements of this window |
199 */ | 206 */ |
200 disableChildren: function() { | 207 disableChildren: function() { |
201 this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(true); | 208 this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(true); |
202 this.down('fset[name=messwerte]').down('messwertgrid').readOnly = true; | 209 this.down('fset[name=messwerte]').down('messwertgrid').readOnly = true; |
203 this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(true); | |
204 this.down('fset[name=messungstatus]').down('statusgrid').readOnly = true; | |
205 this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(true); | 210 this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(true); |
206 this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = true; | 211 this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = true; |
212 this.disableStatusEdit(); | |
207 }, | 213 }, |
208 | 214 |
209 /** | 215 /** |
210 * Enable the Childelements of this window | 216 * Enable the Childelements of this window |
211 */ | 217 */ |
212 enableChildren: function() { | 218 enableChildren: function() { |
213 this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(false); | 219 this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(false); |
214 this.down('fset[name=messwerte]').down('messwertgrid').readOnly = false; | 220 this.down('fset[name=messwerte]').down('messwertgrid').readOnly = false; |
221 this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(false); | |
222 this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = false; | |
223 this.enableStatusEdit(); | |
224 }, | |
225 | |
226 /** | |
227 * Enable to edit the statusgrid | |
228 */ | |
229 enableStatusEdit: function () { | |
215 this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(false); | 230 this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(false); |
216 this.down('fset[name=messungstatus]').down('statusgrid').readOnly = false; | 231 this.down('fset[name=messungstatus]').down('statusgrid').readOnly = false; |
217 this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(false); | 232 }, |
218 this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = false; | 233 |
219 }, | 234 /** |
235 * Disable to edit the statusgrid | |
236 */ | |
237 disableStatusEdit: function () { | |
238 this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(true); | |
239 this.down('fset[name=messungstatus]').down('statusgrid').readOnly = true; | |
240 }, | |
220 | 241 |
221 /** | 242 /** |
222 * Instructs the fields / forms listed in this method to set a message. | 243 * Instructs the fields / forms listed in this method to set a message. |
223 * @param errors These Errors shall be shown | 244 * @param errors These Errors shall be shown |
224 * @param warnings These Warning shall be shown | 245 * @param warnings These Warning shall be shown |