comparison app/view/form/Probe.js @ 1183:287ce20bb1cb schema-update

Set the netzbetreiber and set netzbetreiber widget to a non-form field.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 31 Aug 2016 15:57:49 +0200
parents 1be581a403b5
children
comparison
equal deleted inserted replaced
1182:af65544e47e2 1183:287ce20bb1cb
121 allowBlank: false, 121 allowBlank: false,
122 editable: true, 122 editable: true,
123 hidden: true 123 hidden: true
124 }, { 124 }, {
125 xtype: 'netzbetreiber', 125 xtype: 'netzbetreiber',
126 name: 'netzbetreiberId',
127 editable: false, 126 editable: false,
128 readOnly: true, 127 readOnly: true,
128 isFormField: false,
129 submitValue: false,
129 fieldLabel: 'Netzbetreiber', 130 fieldLabel: 'Netzbetreiber',
130 margin: '0, 5, 5, 5', 131 margin: '0, 5, 5, 5',
131 width: '35%', 132 width: '35%',
132 labelWidth: 80, 133 labelWidth: 80,
133 allowBlank: false 134 allowBlank: false
362 this.getForm().loadRecord(probeRecord); 363 this.getForm().loadRecord(probeRecord);
363 if (!probeRecord.raw) { 364 if (!probeRecord.raw) {
364 return; 365 return;
365 } 366 }
366 var mstStore = Ext.data.StoreManager.get('messstellen'); 367 var mstStore = Ext.data.StoreManager.get('messstellen');
368 var mstId = mstStore.getById(probeRecord.get('mstId'));
367 if (!probeRecord.get('owner')) { 369 if (!probeRecord.get('owner')) {
368 var mstId = mstStore.getById(probeRecord.get('mstId'));
369 var laborMstId = mstStore.getById(probeRecord.get('laborMstId')); 370 var laborMstId = mstStore.getById(probeRecord.get('laborMstId'));
370 if (laborMstId) { 371 if (laborMstId) {
371 laborMstId = laborMstId.get('messStelle'); 372 laborMstId = laborMstId.get('messStelle');
372 } 373 }
373 else { 374 else {
395 return true; 396 return true;
396 } 397 }
397 }); 398 });
398 this.down('messstellelabor').setValue(items.getAt(0)); 399 this.down('messstellelabor').setValue(items.getAt(0));
399 } 400 }
401 this.down('netzbetreiber').setValue(mstId.get('netzbetreiberId'));
400 }, 402 },
401 403
402 setMediaDesk: function(record) { 404 setMediaDesk: function(record) {
403 var media = record.get('mediaDesk').split(' '); 405 var media = record.get('mediaDesk').split(' ');
404 this.setMediaSN(0, media); 406 this.setMediaSN(0, media);
475 this.down('tfield[name=hauptprobenNr]').clearWarningOrError(); 477 this.down('tfield[name=hauptprobenNr]').clearWarningOrError();
476 this.down('cbox[name=datenbasisId]').clearWarningOrError(); 478 this.down('cbox[name=datenbasisId]').clearWarningOrError();
477 this.down('cbox[name=baId]').clearWarningOrError(); 479 this.down('cbox[name=baId]').clearWarningOrError();
478 this.down('chkbox[name=test]').clearWarningOrError(); 480 this.down('chkbox[name=test]').clearWarningOrError();
479 this.down('cbox[name=probenartId]').clearWarningOrError(); 481 this.down('cbox[name=probenartId]').clearWarningOrError();
480 this.down('cbox[name=netzbetreiberId]').clearWarningOrError(); 482 this.down('netzbetreiber').clearWarningOrError();
481 this.down('cbox[name=erzeugerId]').clearWarningOrError(); 483 this.down('cbox[name=erzeugerId]').clearWarningOrError();
482 this.down('cbox[name=umwId]').clearWarningOrError(); 484 this.down('cbox[name=umwId]').clearWarningOrError();
483 this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError(); 485 this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();
484 this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError(); 486 this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError();
485 this.down('fset[name=entnahmePeriod]').clearMessages(); 487 this.down('fset[name=entnahmePeriod]').clearMessages();

http://lada.wald.intevation.org