Mercurial > lada > lada-client
comparison app/view/window/MessprogrammOrt.js @ 1251:0a47e8af9006
Fixed orte window in messprogramm.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 15 Nov 2016 13:27:10 +0100 |
parents | def27cdd0dfa |
children | 08085b7d1d0b |
comparison
equal
deleted
inserted
replaced
1250:5824c4b329f4 | 1251:0a47e8af9006 |
---|---|
184 */ | 184 */ |
185 selectedFeature: function(context, args) { | 185 selectedFeature: function(context, args) { |
186 var feature = args[0]; | 186 var feature = args[0]; |
187 if (feature.attributes.id && | 187 if (feature.attributes.id && |
188 feature.attributes.id !== '') { | 188 feature.attributes.id !== '') { |
189 var record = Ext.data.StoreManager.get('locations').getById(feature.attributes.id); | 189 var record = Ext.data.StoreManager.get('orte').getById(feature.attributes.id); |
190 context.up('window').down('locationform').setRecord(record); | 190 context.up('window').down('locationform').setRecord(record); |
191 context.up('window').down('locationform').setReadOnly(true); | 191 context.up('window').down('locationform').setReadOnly(true); |
192 context.up('window').down('location').down('combobox').setValue(record.id); | 192 context.up('window').down('location').down('combobox').setValue(record.id); |
193 } | 193 } |
194 else { | 194 else { |
209 var details = win.down('locationform'); | 209 var details = win.down('locationform'); |
210 //var id = record[0].get('id'); // We are interested in the cbox... | 210 //var id = record[0].get('id'); // We are interested in the cbox... |
211 var id = combobox.getValue(); | 211 var id = combobox.getValue(); |
212 | 212 |
213 if (details) { | 213 if (details) { |
214 var toLoad = Ext.data.StoreManager.get('locations').getById(id); | 214 var toLoad = Ext.data.StoreManager.get('orte').getById(id); |
215 win.down('locationform').setRecord(toLoad); | 215 win.down('locationform').setRecord(toLoad); |
216 win.down('map').selectFeature(id); | 216 win.down('map').selectFeature(id, toLoad); |
217 } | 217 } |
218 }, | 218 }, |
219 | 219 |
220 /** | 220 /** |
221 * Write the selected ortId into the record, and update the MessprogrammWindow. | 221 * Write the selected ortId into the record, and update the MessprogrammWindow. |