Mercurial > lada > lada-client
comparison app/view/window/ProbeEdit.js @ 1034:4d4de99bbe53
Get rid of double setting readOnly status of probe window child elements.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 18 Feb 2016 11:21:22 +0100 |
parents | e4b6b6c5fb89 |
children | 981339d774b8 |
comparison
equal
deleted
inserted
replaced
1033:e4b6b6c5fb89 | 1034:4d4de99bbe53 |
---|---|
180 disableChildren: function() { | 180 disableChildren: function() { |
181 if (!this.record.get('owner')) { | 181 if (!this.record.get('owner')) { |
182 // Disable only when the User is not the owner of the Probe | 182 // Disable only when the User is not the owner of the Probe |
183 // Works in symbiosis with success callback some lines above. | 183 // Works in symbiosis with success callback some lines above. |
184 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); | 184 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); |
185 this.down('fset[name=messungen]').down('messunggrid').readOnly = true; | |
186 } | 185 } |
187 this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); | 186 this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); |
188 this.down('fset[name=orte]').down('ortgrid').readOnly = true; | |
189 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); | 187 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); |
190 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = true; | |
191 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); | 188 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); |
192 this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = true; | |
193 }, | 189 }, |
194 | 190 |
195 /** | 191 /** |
196 * Enable the Childelements of this window | 192 * Enable the Childelements of this window |
197 */ | 193 */ |
198 enableChildren: function() { | 194 enableChildren: function() { |
199 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); | 195 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); |
200 this.down('fset[name=messungen]').down('messunggrid').readOnly = false; | |
201 this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); | 196 this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); |
202 this.down('fset[name=orte]').down('ortgrid').readOnly = false; | |
203 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); | 197 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); |
204 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = false; | |
205 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); | 198 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); |
206 this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = false; | |
207 }, | 199 }, |
208 | 200 |
209 /** | 201 /** |
210 * Instructs the fields / forms listed in this method to set a message. | 202 * Instructs the fields / forms listed in this method to set a message. |
211 * @param errors These Errors shall be shown | 203 * @param errors These Errors shall be shown |