comparison app/view/form/Probe.js @ 685:0391425689ed

Also Deskriptoren must be set to readonly
author Dustin Demuth <dustin@intevation.de>
date Wed, 25 Mar 2015 15:18:46 +0100
parents 69cb367c0a63
children f124d24c8ade
comparison
equal deleted inserted replaced
684:69cb367c0a63 685:0391425689ed
360 this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value); 360 this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
361 this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value); 361 this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value);
362 this.down('datetime[name=solldatumBeginn]').setReadOnly(value); 362 this.down('datetime[name=solldatumBeginn]').setReadOnly(value);
363 this.down('datetime[name=solldatumEnde]').setReadOnly(value); 363 this.down('datetime[name=solldatumEnde]').setReadOnly(value);
364 this.down('numberfield[name=probeNehmerId]').setReadOnly(value); 364 this.down('numberfield[name=probeNehmerId]').setReadOnly(value);
365
366 //Deskriptoren
367 for (var i = 0; i < 12; i++) {
368 this.down('field[name=s'+i+']').setReadOnly(value);
369 }
365 }, 370 },
366 371
367 buildDescriptors: function() { 372 buildDescriptors: function() {
368 var fields = []; 373 var fields = [];
369 var ro = false;
370 if (this.readonly) {
371 ro = true;
372 }
373 for (var i = 0; i < 12; i++) { 374 for (var i = 0; i < 12; i++) {
374 fields[i] = { 375 fields[i] = {
375 fieldLabel: 'S' + i, 376 fieldLabel: 'S' + i,
376 name: 's' + i, 377 name: 's' + i,
377 labelWidth: 25, 378 labelWidth: 25,
378 margin: '0, 10, 5, 0', 379 margin: '0, 10, 5, 0',
379 readOnly: ro
380 }; 380 };
381 } 381 }
382 return fields; 382 return fields;
383 } 383 }
384 }); 384 });

http://lada.wald.intevation.org