Mercurial > lada > lada-client
comparison app/view/window/ProbeEdit.js @ 823:5ed0e6273888
Only enable delete button in grids when an entry was selected
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 29 May 2015 14:03:18 +0200 |
parents | dd6925ef6028 |
children | 135cd5814b15 |
comparison
equal
deleted
inserted
replaced
822:a0666d755405 | 823:5ed0e6273888 |
---|---|
167 disableChildren: function() { | 167 disableChildren: function() { |
168 if (!this.record.get('owner')) { | 168 if (!this.record.get('owner')) { |
169 // Disable only when the User is not the owner of the Probe | 169 // Disable only when the User is not the owner of the Probe |
170 // Works in symbiosis with success callback some lines above. | 170 // Works in symbiosis with success callback some lines above. |
171 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); | 171 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); |
172 this.down('fset[name=messungen]').down('messunggrid').readOnly = true; | |
172 } | 173 } |
173 this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); | 174 this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); |
175 this.down('fset[name=orte]').down('ortgrid').readOnly = true; | |
174 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); | 176 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); |
177 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = true; | |
175 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); | 178 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); |
179 this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = true; | |
176 }, | 180 }, |
177 | 181 |
178 enableChildren: function() { | 182 enableChildren: function() { |
179 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); | 183 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); |
184 this.down('fset[name=messungen]').down('messunggrid').readOnly = false; | |
180 this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); | 185 this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); |
186 this.down('fset[name=orte]').down('ortgrid').readOnly = false; | |
181 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); | 187 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); |
188 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = false; | |
182 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); | 189 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); |
190 this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = false; | |
183 }, | 191 }, |
184 | 192 |
185 setMessages: function(errors, warnings) { | 193 setMessages: function(errors, warnings) { |
186 this.down('probeform').setMessages(errors, warnings); | 194 this.down('probeform').setMessages(errors, warnings); |
187 var errorOrtText = ''; | 195 var errorOrtText = ''; |