comparison app/controller/form/Probe.js @ 1085:3c42c06e3a36

Decreased descriptor string parts.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 28 Apr 2016 16:46:48 +0200
parents d198946e5540
children 8f37f8832c4a
comparison
equal deleted inserted replaced
1084:54457d3f7f63 1085:3c42c06e3a36
229 deskriptorSelect: function(field, records) { 229 deskriptorSelect: function(field, records) {
230 var desk = field.up('deskriptor'); 230 var desk = field.up('deskriptor');
231 var media = field.up('probeform').down('textfield[name="mediaDesk"]'); 231 var media = field.up('probeform').down('textfield[name="mediaDesk"]');
232 var current = media.getValue().split(' '); 232 var current = media.getValue().split(' ');
233 233
234 if (current.length < 13) { 234 if (current.length < 12) {
235 for (var i = 0; i <= 12; i++) { 235 for (var i = 0; i < 12; i++) {
236 if (i === 0) { 236 if (i === 0) {
237 current.push('D:'); 237 current.push('D:');
238 } 238 }
239 else if (i === desk.layer + 1) { 239 else if (i === desk.layer + 1) {
240 var value; 240 var value;
259 else { 259 else {
260 value = records[0].get('sn'); 260 value = records[0].get('sn');
261 } 261 }
262 current[desk.layer + 1] = value; 262 current[desk.layer + 1] = value;
263 if (desk.layer < 2) { 263 if (desk.layer < 2) {
264 for (var i = desk.layer + 2; i < 13; i++) { 264 for (var i = desk.layer + 2; i < 12; i++) {
265 current[i] = '00'; 265 current[i] = '00';
266 } 266 }
267 this.clearChildDesk(desk); 267 this.clearChildDesk(desk);
268 } 268 }
269 else if (desk.layer === 2 && current[1] === '01') { 269 else if (desk.layer === 2 && current[1] === '01') {

http://lada.wald.intevation.org