Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/controller/form/Probe.js Wed Aug 26 15:29:29 2015 +0200 +++ b/app/controller/form/Probe.js Fri Sep 11 12:20:20 2015 +0200 @@ -27,7 +27,7 @@ 'probeform': { dirtychange: this.dirtyForm }, - 'probeform messstelle combobox':{ + 'probeform messstelle combobox': { expand: this.filter, keydown: this.filter, select: this.setNetzbetreiber @@ -257,15 +257,18 @@ value = records[0].get('sn'); } current[desk.layer + 1] = value; + for (var i = desk.layer + 2; i < 13; i++) { + current[i] = '00'; + } + this.clearChildDesk(desk); } media.setValue(current.join(' ').trim()); }, - clearChildDesk: function(field, media) { + clearChildDesk: function(field) { var allS = field.up('fieldset').items.items; for (var i = field.layer + 1; i < 12; i++) { allS[i].clearValue(); - media[i + 1] = '00'; } }