comparison app/controller/form/Probe.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 81e7c847cb58
comparison
equal deleted inserted replaced
844:1449d58d6f58 846:af9d506b0700
59 }, 59 },
60 60
61 /** 61 /**
62 * When a Messtelle is selected, modify the Netzbetreiber 62 * When a Messtelle is selected, modify the Netzbetreiber
63 * according to the Messstelle 63 * according to the Messstelle
64 * TODO: The conditions when to apply this automatism are still
65 * unclear. Right now it is only applied when the NB is not set.
66 */ 64 */
67 setNetzbetreiber: function(combo, records){ 65 setNetzbetreiber: function(combo, records){
68 var netzbetreiber = combo.up().up('form') 66 var netzbetreiber = combo.up().up('form')
69 .down('netzbetreiber').down('combobox'); 67 .down('netzbetreiber').down('combobox');
70 var nbId = records[0].get('netzbetreiberId'); 68 var nbId = records[0].get('netzbetreiberId');
71 69
72 if (nbId != null && 70 if (nbId != null) {
73 (netzbetreiber.value === '' || netzbetreiber.value === null)) {
74 //select the NB in the NB-Combobox 71 //select the NB in the NB-Combobox
75 netzbetreiber.select(nbId); 72 netzbetreiber.select(nbId);
76 } 73 }
77 }, 74 },
78 75

http://lada.wald.intevation.org