comparison app/view/form/Probe.js @ 783:afdbe3770b99

Exclude deskriptor fields from form.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 May 2015 10:22:53 +0200
parents dd6925ef6028
children e25fcc9269df
comparison
equal deleted inserted replaced
782:a0cfe2395e0a 783:afdbe3770b99
178 fn: this.updateOnChange, 178 fn: this.updateOnChange,
179 scope: me 179 scope: me
180 } 180 }
181 } 181 }
182 }, { 182 }, {
183 xtype: 'textfield', 183 xtype: 'tfield',
184 maxLength: 38, 184 maxLength: 38,
185 enforceMaxLength: true, 185 enforceMaxLength: true,
186 name: 'mediaDesk', 186 name: 'mediaDesk',
187 labelWidth: 125, 187 labelWidth: 125,
188 fieldLabel: 'Deskriptoren', 188 fieldLabel: 'Deskriptoren',
211 }, { 211 }, {
212 xtype: 'fieldset', 212 xtype: 'fieldset',
213 title: 'Details Deskriptoren', 213 title: 'Details Deskriptoren',
214 collapsible: true, 214 collapsible: true,
215 collapsed: true, 215 collapsed: true,
216 defaultType: 'textfield',
217 layout: { 216 layout: {
218 type: 'table', 217 type: 'table',
219 columns: 3 218 columns: 3
220 }, 219 },
221 items: this.buildDescriptors(), 220 items: this.buildDescriptors()
222 listeners: {
223 dirtychange: {
224 fn: this.updateOnChange,
225 scope: me
226 }
227 }
228 }] 221 }]
229 }] 222 }]
230 }, { 223 }, {
231 // Zeit 224 // Zeit
232 xtype: 'fieldset', 225 xtype: 'fieldset',
403 this.down('cbox[name=test]').setReadOnly(value); 396 this.down('cbox[name=test]').setReadOnly(value);
404 this.down('cbox[name=probenartId]').setReadOnly(value); 397 this.down('cbox[name=probenartId]').setReadOnly(value);
405 this.down('cbox[name=netzbetreiberId]').setReadOnly(value); 398 this.down('cbox[name=netzbetreiberId]').setReadOnly(value);
406 this.down('tfield[name=x11]').setReadOnly(value); 399 this.down('tfield[name=x11]').setReadOnly(value);
407 this.down('textfield[name=media]').setReadOnly(value); 400 this.down('textfield[name=media]').setReadOnly(value);
408 this.down('textfield[name=mediaDesk]').setReadOnly(value); 401 this.down('tfield[name=mediaDesk]').setReadOnly(value);
409 this.down('cbox[name=umwId]').setReadOnly(value); 402 this.down('cbox[name=umwId]').setReadOnly(value);
410 this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value); 403 this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
411 this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value); 404 this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value);
412 this.down('datetime[name=solldatumBeginn]').setReadOnly(value); 405 this.down('datetime[name=solldatumBeginn]').setReadOnly(value);
413 this.down('datetime[name=solldatumEnde]').setReadOnly(value); 406 this.down('datetime[name=solldatumEnde]').setReadOnly(value);
414 this.down('numberfield[name=probeNehmerId]').setReadOnly(value); 407 this.down('numberfield[name=probeNehmerId]').setReadOnly(value);
415 408
416 //Deskriptoren 409 //Deskriptoren
417 for (var i = 0; i < 12; i++) { 410 for (var i = 0; i < 12; i++) {
418 this.down('field[name=s'+i+']').setReadOnly(value); 411 this.down('deskriptor[layer='+i+']').setReadOnly(value);
419 } 412 }
420 }, 413 },
421 414
422 buildDescriptors: function() { 415 buildDescriptors: function() {
423 var fields = []; 416 var fields = [];
424 for (var i = 0; i < 12; i++) { 417 for (var i = 0; i < 12; i++) {
425 fields[i] = { 418 fields[i] = {
426 xtype: 'deskriptor', 419 xtype: 'deskriptor',
427 fieldLabel: 'S' + i, 420 fieldLabel: 'S' + i,
428 name: 's' + i, 421 //name: 's' + i,
429 labelWidth: 25, 422 labelWidth: 25,
430 width: 190, 423 width: 190,
431 layer: i, 424 layer: i,
432 margin: '0, 10, 5, 0' 425 margin: '0, 10, 5, 0'
433 }; 426 };

http://lada.wald.intevation.org