Mercurial > lada > lada-client
comparison app/view/window/ProbeEdit.js @ 712:baef70abfe71
Cosmetics.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 08 Apr 2015 10:52:15 +0200 |
parents | f204f30b824a |
children | 2e478b3a587a |
comparison
equal
deleted
inserted
replaced
711:af16a257d5f6 | 712:baef70abfe71 |
---|---|
120 this.clearMessages(); | 120 this.clearMessages(); |
121 me = this; | 121 me = this; |
122 Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), { | 122 Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), { |
123 failure: function(record, action) { | 123 failure: function(record, action) { |
124 // TODO | 124 // TODO |
125 console.log("An unhandled Failure occured. See following Response and Record"); | 125 console.log('An unhandled Failure occured. See following Response and Record'); |
126 console.log(response); | 126 console.log(action); |
127 console.log(record); | 127 console.log(record); |
128 }, | 128 }, |
129 success: function(record, response) { | 129 success: function(record, response) { |
130 this.down('probeform').setRecord(record); | 130 this.down('probeform').setRecord(record); |
131 this.record = record; | 131 this.record = record; |
152 }, | 152 }, |
153 scope: this | 153 scope: this |
154 }); | 154 }); |
155 }, | 155 }, |
156 | 156 |
157 enableAddMessungen: function(){ | 157 enableAddMessungen: function() { |
158 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); | 158 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); |
159 }, | 159 }, |
160 | 160 |
161 disableChildren: function(){ | 161 disableChildren: function() { |
162 if (!this.record.get('owner')) { | 162 if (!this.record.get('owner')) { |
163 // Disable only when the User is not the owner of the Probe | 163 // Disable only when the User is not the owner of the Probe |
164 // Works in symbiosis with success callback some lines above. | 164 // Works in symbiosis with success callback some lines above. |
165 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); | 165 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); |
166 } | 166 } |
167 this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); | 167 this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); |
168 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); | 168 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); |
169 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); | 169 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); |
170 }, | 170 }, |
171 | 171 |
172 enableChildren: function(){ | 172 enableChildren: function() { |
173 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); | 173 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); |
174 this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); | 174 this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); |
175 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); | 175 this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); |
176 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); | 176 this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); |
177 }, | 177 }, |