Mercurial > lada > lada-client
comparison app/controller/form/Messprogramm.js @ 846:af9d506b0700
always modify the netzbetreiber when the Messstelle was changed
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 07 Jul 2015 14:14:00 +0200 |
parents | 05124d559e59 |
children | 01cddda65fea |
comparison
equal
deleted
inserted
replaced
844:1449d58d6f58 | 846:af9d506b0700 |
---|---|
79 }, | 79 }, |
80 | 80 |
81 /** | 81 /** |
82 * When a Messtelle is selected, modify the Netzbetreiber | 82 * When a Messtelle is selected, modify the Netzbetreiber |
83 * according to the Messstelle | 83 * according to the Messstelle |
84 * TODO: The conditions when to apply this automatism are still | |
85 * unclear. Right now it is only applied when the NB is not set. | |
86 */ | 84 */ |
87 setNetzbetreiber: function(combo, records){ | 85 setNetzbetreiber: function(combo, records){ |
88 var netzbetreiber = combo.up().up('form') | 86 var netzbetreiber = combo.up().up('form') |
89 .down('netzbetreiber').down('combobox'); | 87 .down('netzbetreiber').down('combobox'); |
90 var nbId = records[0].get('netzbetreiberId'); | 88 var nbId = records[0].get('netzbetreiberId'); |
91 | 89 |
92 if (nbId != null && | 90 if (nbId != null) { |
93 (netzbetreiber.value === '' || netzbetreiber.value === null)) { | |
94 //select the NB in the NB-Combobox | 91 //select the NB in the NB-Combobox |
95 netzbetreiber.select(nbId); | 92 netzbetreiber.select(nbId); |
96 } | 93 } |
97 }, | 94 }, |
98 | 95 |