comparison app/view/form/Probe.js @ 1217:4270da0f7d3b

Merged branch schema-update into default.
author Tom Gottfried <tom@intevation.de>
date Fri, 14 Oct 2016 18:34:19 +0200
parents ec2b10d81343
children 390dabbf27ed
comparison
equal deleted inserted replaced
1216:75e5caebd392 1217:4270da0f7d3b
129 allowBlank: false, 129 allowBlank: false,
130 editable: true, 130 editable: true,
131 hidden: true 131 hidden: true
132 }, { 132 }, {
133 xtype: 'netzbetreiber', 133 xtype: 'netzbetreiber',
134 name: 'netzbetreiberId',
135 editable: false, 134 editable: false,
136 readOnly: true, 135 readOnly: true,
136 isFormField: false,
137 submitValue: false,
137 fieldLabel: 'Netzbetreiber', 138 fieldLabel: 'Netzbetreiber',
138 margin: '0, 5, 5, 5', 139 margin: '0, 5, 5, 5',
139 width: '35%', 140 width: '35%',
140 labelWidth: 80, 141 labelWidth: 80,
141 allowBlank: false 142 allowBlank: false
370 this.getForm().loadRecord(probeRecord); 371 this.getForm().loadRecord(probeRecord);
371 if (!probeRecord.raw) { 372 if (!probeRecord.raw) {
372 return; 373 return;
373 } 374 }
374 var mstStore = Ext.data.StoreManager.get('messstellen'); 375 var mstStore = Ext.data.StoreManager.get('messstellen');
376 var mstId = mstStore.getById(probeRecord.get('mstId'));
375 if (!probeRecord.get('owner')) { 377 if (!probeRecord.get('owner')) {
376 var mstId = mstStore.getById(probeRecord.get('mstId'));
377 var laborMstId = mstStore.getById(probeRecord.get('laborMstId')); 378 var laborMstId = mstStore.getById(probeRecord.get('laborMstId'));
378 if (laborMstId) { 379 if (laborMstId) {
379 laborMstId = laborMstId.get('messStelle'); 380 laborMstId = laborMstId.get('messStelle');
380 } 381 }
381 else { 382 else {
403 return true; 404 return true;
404 } 405 }
405 }); 406 });
406 this.down('messstellelabor').setValue(items.getAt(0)); 407 this.down('messstellelabor').setValue(items.getAt(0));
407 } 408 }
409 this.down('netzbetreiber').setValue(mstId.get('netzbetreiberId'));
408 }, 410 },
409 411
410 setMediaDesk: function(record) { 412 setMediaDesk: function(record) {
411 var media = record.get('mediaDesk').split(' '); 413 var media = record.get('mediaDesk').split(' ');
412 this.setMediaSN(0, media); 414 this.setMediaSN(0, media);
483 this.down('tfield[name=hauptprobenNr]').clearWarningOrError(); 485 this.down('tfield[name=hauptprobenNr]').clearWarningOrError();
484 this.down('cbox[name=datenbasisId]').clearWarningOrError(); 486 this.down('cbox[name=datenbasisId]').clearWarningOrError();
485 this.down('cbox[name=baId]').clearWarningOrError(); 487 this.down('cbox[name=baId]').clearWarningOrError();
486 this.down('chkbox[name=test]').clearWarningOrError(); 488 this.down('chkbox[name=test]').clearWarningOrError();
487 this.down('cbox[name=probenartId]').clearWarningOrError(); 489 this.down('cbox[name=probenartId]').clearWarningOrError();
488 this.down('cbox[name=netzbetreiberId]').clearWarningOrError(); 490 this.down('netzbetreiber').clearWarningOrError();
489 this.down('cbox[name=erzeugerId]').clearWarningOrError(); 491 this.down('cbox[name=erzeugerId]').clearWarningOrError();
490 this.down('cbox[name=umwId]').clearWarningOrError(); 492 this.down('cbox[name=umwId]').clearWarningOrError();
491 this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError(); 493 this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();
492 this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError(); 494 this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError();
493 this.down('fset[name=entnahmePeriod]').clearMessages(); 495 this.down('fset[name=entnahmePeriod]').clearMessages();

http://lada.wald.intevation.org