comparison app/controller/form/Probe.js @ 925:81e7c847cb58

Clear child descriptor fields on descriptor change.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 11 Sep 2015 12:20:20 +0200
parents af9d506b0700
children c8aceb9e60cc
comparison
equal deleted inserted replaced
924:9265637fe6c0 925:81e7c847cb58
25 click: this.discard 25 click: this.discard
26 }, 26 },
27 'probeform': { 27 'probeform': {
28 dirtychange: this.dirtyForm 28 dirtychange: this.dirtyForm
29 }, 29 },
30 'probeform messstelle combobox':{ 30 'probeform messstelle combobox': {
31 expand: this.filter, 31 expand: this.filter,
32 keydown: this.filter, 32 keydown: this.filter,
33 select: this.setNetzbetreiber 33 select: this.setNetzbetreiber
34 }, 34 },
35 'probeform [xtype="datetime"] field': { 35 'probeform [xtype="datetime"] field': {
255 } 255 }
256 else { 256 else {
257 value = records[0].get('sn'); 257 value = records[0].get('sn');
258 } 258 }
259 current[desk.layer + 1] = value; 259 current[desk.layer + 1] = value;
260 for (var i = desk.layer + 2; i < 13; i++) {
261 current[i] = '00';
262 }
263 this.clearChildDesk(desk);
260 } 264 }
261 media.setValue(current.join(' ').trim()); 265 media.setValue(current.join(' ').trim());
262 }, 266 },
263 267
264 clearChildDesk: function(field, media) { 268 clearChildDesk: function(field) {
265 var allS = field.up('fieldset').items.items; 269 var allS = field.up('fieldset').items.items;
266 for (var i = field.layer + 1; i < 12; i++) { 270 for (var i = field.layer + 1; i < 12; i++) {
267 allS[i].clearValue(); 271 allS[i].clearValue();
268 media[i + 1] = '00';
269 } 272 }
270 } 273 }
271 274
272 }); 275 });

http://lada.wald.intevation.org