dustin@757: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz dustin@757: * Software engineering by Intevation GmbH dustin@757: * dustin@757: * This file is Free Software under the GNU GPL (v>=3) dustin@757: * and comes with ABSOLUTELY NO WARRANTY! Check out dustin@757: * the documentation coming with IMIS-Labordaten-Application for details. dustin@757: */ dustin@757: dustin@894: /** dustin@894: * Form to edit a Messprogramm dustin@757: */ dustin@757: Ext.define('Lada.view.form.Messprogramm', { dustin@757: extend: 'Ext.form.Panel', dustin@757: alias: 'widget.messprogrammform', dustin@757: requires: [ dustin@757: 'Lada.view.widget.Datenbasis', mstanko@1086: 'Lada.view.widget.base.CheckBox', dustin@757: 'Lada.view.widget.Messstelle', dustin@757: 'Lada.view.widget.Netzbetreiber', dustin@757: 'Lada.view.widget.Betriebsart', dustin@757: 'Lada.view.widget.Probenart', dustin@757: 'Lada.view.widget.Umwelt', dustin@757: 'Lada.view.widget.base.TextField', tom@1168: 'Lada.view.widget.base.NumberField', dustin@757: 'Lada.view.widget.base.FieldSet', dustin@757: 'Lada.model.Messprogramm', dustin@757: 'Lada.model.MmtMessprogramm', dustin@757: 'Lada.view.widget.Probenintervall', dustin@797: 'Lada.view.widget.Location', dustin@757: 'Lada.view.widget.ProbenintervallSlider', dustin@757: 'Lada.view.widget.base.Datetime', dustin@757: 'Lada.view.widget.base.DateField' dustin@757: ], dustin@757: dustin@757: model: 'Lada.model.Messprogramm', dustin@757: minWidth: 650, dustin@757: margin: 5, dustin@757: border: 0, dustin@757: dustin@757: recordId: null, dustin@797: ortWindow: null, dustin@757: dustin@757: trackResetOnLoad: true, dustin@757: dustin@757: initComponent: function() { dustin@757: var me = this; dustin@757: var i18n = Lada.getApplication().bundle; dustin@757: this.items = [{ dustin@757: xtype: 'fieldset', dustin@757: title: i18n.getMsg('messprogramm.form.fieldset.title'), dustin@757: items: [{ dustin@757: border: 0, dustin@757: margin: '0, 0, 10, 0', dustin@757: dockedItems: [{ dustin@757: xtype: 'toolbar', dustin@757: dock: 'bottom', dustin@757: border: '0, 1, 1, 1', dustin@757: style: { dustin@757: borderBottom: '1px solid #b5b8c8 !important', dustin@757: borderLeft: '1px solid #b5b8c8 !important', dustin@757: borderRight: '1px solid #b5b8c8 !important' dustin@757: }, dustin@757: items: ['->', { dustin@757: text: i18n.getMsg('save'), dustin@757: qtip: i18n.getMsg('save.qtip'), dustin@757: icon: 'resources/img/dialog-ok-apply.png', dustin@757: action: 'save', dustin@757: disabled: true dustin@757: }, { dustin@757: text: i18n.getMsg('discard'), dustin@757: qtip: i18n.getMsg('discard.qtip'), dustin@757: icon: 'resources/img/dialog-cancel.png', dustin@757: action: 'discard', dustin@757: disabled: true dustin@757: }] dustin@757: }], dustin@757: items: [{ dustin@757: border: 0, dustin@757: minWidth: 290, dustin@757: layout: { dustin@757: type: 'vbox', dustin@757: align: 'stretch' dustin@757: }, dustin@757: margin: '0, 10, 0, 0', dustin@757: items: [{ mstanko@1086: layout: { mstanko@1086: type: 'hbox', mstanko@1086: align: 'stretch' mstanko@1086: }, mstanko@1086: border: 0, mstanko@1086: items: [{ mstanko@1086: xtype: 'messstellelabor', mstanko@1086: name: 'mstlabor', mstanko@1086: fieldLabel: 'Messstelle/Labor', mstanko@1086: margin: '0, 5, 5, 5', mstanko@1086: width: '35%', mstanko@1086: labelWidth: 95, mstanko@1086: allowBlank: false, mstanko@1086: editable: true, mstanko@1086: listeners: { mstanko@1086: select: { mstanko@1086: fn: function(combo, newValue) { mstanko@1086: var mst = newValue[0].get('messStelle'); mstanko@1086: var labor = newValue[0].get('laborMst'); mstanko@1086: combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst); mstanko@1086: combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor); mstanko@1086: } raimund@1067: } raimund@1067: } mstanko@1086: }, { mstanko@1086: xtype: 'messstelle', mstanko@1086: name: 'mstId', mstanko@1086: fieldLabel: 'Messstelle/Labor', mstanko@1086: margin: '0, 5, 5, 5', mstanko@1086: width: '35%', mstanko@1086: labelWidth: 95, mstanko@1086: allowBlank: false, mstanko@1086: editable: true, mstanko@1086: hidden: true mstanko@1086: }, { mstanko@1086: xtype: 'messstelle', mstanko@1086: name: 'laborMstId', mstanko@1086: fieldLabel: 'Messstelle/Labor', mstanko@1086: margin: '0, 5, 5, 5', mstanko@1086: width: '35%', mstanko@1086: labelWidth: 95, mstanko@1086: allowBlank: false, mstanko@1086: editable: true, mstanko@1086: hidden: true mstanko@1086: }, { mstanko@1086: xtype: 'netzbetreiber', mstanko@1086: name: 'netzbetreiberId', mstanko@1086: editable: false, mstanko@1086: readOnly: true, mstanko@1086: fieldLabel: i18n.getMsg('netzbetreiberId'), mstanko@1086: margin : '0, 5, 5, 5', mstanko@1086: width : '35%', dustin@797: labelWidth: 80, dustin@797: }, { dustin@757: xtype: 'datenbasis', dustin@757: editable: false, dustin@757: name: 'datenbasisId', dustin@757: fieldLabel: i18n.getMsg('datenbasisId'), mstanko@1086: margin : '0, 5, 5, 5', mstanko@1086: width : '20%', mstanko@1086: labelWidth: 65 mstanko@1086: }, { mstanko@1086: xtype: 'chkbox', mstanko@1086: name: 'test', mstanko@1086: fieldLabel: i18n.getMsg('test'), dustin@757: anchor: '100%', mstanko@1086: margin : '0, 5, 5, 5', mstanko@1086: width : '10%', mstanko@1086: labelWidth: 30, mstanko@1086: allowBlank: false mstanko@1086: }] mstanko@1086: }, { mstanko@1086: layout: { mstanko@1086: type: 'hbox', mstanko@1086: align: 'stretch' mstanko@1086: }, mstanko@1086: border: 0, mstanko@1086: items: [{ mstanko@1086: xtype: 'tfield', mstanko@1086: name: 'name', mstanko@1086: fieldLabel: i18n.getMsg('mprId'), mstanko@1086: margin: '0, 5, 5, 5', mstanko@1086: width: '35%', mstanko@1086: labelWidth: 95, mstanko@1086: maxLength: 20, mstanko@1086: editable: true dustin@757: }, { dustin@757: xtype: 'betriebsart', dustin@757: name: 'baId', ehuber@1108: margin: '0, 5, 5, 5', dustin@757: fieldLabel: i18n.getMsg('baId'), ehuber@1108: //anchor: '100%', ehuber@1108: width: '35%', ehuber@1108: labelWidth: 80 dustin@757: }, { dustin@757: xtype: 'probenart', dustin@757: editable: false, dustin@757: name: 'probenartId', dustin@757: fieldLabel: i18n.getMsg('probenartId'), ehuber@1108: margin: '0, 5, 5, 5', mstanko@1086: width: '20%', ehuber@1108: labelWidth: 70, dustin@757: allowBlank: false mstanko@1086: }] mstanko@1086: }] mstanko@1086: }, { mstanko@1086: // Zeit mstanko@1086: xtype: 'fieldset', mstanko@1086: title: i18n.getMsg('probenintervall'), mstanko@1086: layout: { mstanko@1086: type: 'vbox', mstanko@1086: align: 'stretch' mstanko@1086: }, mstanko@1086: items: [{ mstanko@1086: xtype: 'fset', mstanko@1086: name: 'probenIntervallFieldset', mstanko@1086: layout: { mstanko@1086: type: 'hbox', mstanko@1086: align: 'stretch' mstanko@1086: }, mstanko@1086: border: 0, mstanko@1086: margin: '0, 0, 0, 0', mstanko@1086: items: [{ mstanko@1086: xtype: 'probenintervall', mstanko@1086: fieldLabel: i18n.getMsg('probenintervall'), mstanko@1086: margin: '0, 10, 5, 5', mstanko@1086: labelWidth: 50, mstanko@1086: width: '40%', mstanko@1086: name: 'probenintervall' mstanko@1086: }, { tom@1168: xtype: 'numfield', tom@1169: allowDecimals: false, mstanko@1086: fieldLabel: i18n.getMsg('teilintervallVon'), mstanko@1086: margin: '0, 10, 5, 10', mstanko@1086: labelWidth: 90, mstanko@1086: width: '28%', mstanko@1086: name: 'teilintervallVon', mstanko@1086: period: 'start' mstanko@1086: }, { tom@1168: xtype: 'numfield', tom@1169: allowDecimals: false, mstanko@1086: fieldLabel: i18n.getMsg('teilintervallBis'), mstanko@1086: margin: '0, 15, 5, 5', mstanko@1086: labelWidth: 18, ehuber@1108: width: '15%', mstanko@1086: name: 'teilintervallBis', mstanko@1086: period: 'end' mstanko@1086: }, { tom@1168: xtype: 'numfield', tom@1169: allowDecimals: false, mstanko@1086: margin: '0, 10, 5, 5', mstanko@1086: fieldLabel: i18n.getMsg('offset'), mstanko@1086: labelWidth: 45, ehuber@1108: width: '17%', mstanko@1086: name: 'intervallOffset' mstanko@1086: }] mstanko@1086: }, { mstanko@1086: xtype: 'probenintervallslider', mstanko@1086: // fieldLabel: i18n.getMsg('intervall'), mstanko@1086: // labelWidth: 70, mstanko@1086: pack: 'center', mstanko@1086: width: '70%', mstanko@1086: margin: '0, 40, 10, 40', mstanko@1086: values: [0, 0] mstanko@1086: //this will be overridden mstanko@1086: // by setRecord mstanko@1086: }, { mstanko@1086: xtype: 'fset', mstanko@1086: name: 'gueltigPeriodFieldset', mstanko@1086: layout: { mstanko@1086: type: 'hbox', mstanko@1086: align: 'stretch' mstanko@1086: }, mstanko@1086: border: 0, mstanko@1086: items: [{ mstanko@1086: xtype: 'datetime', mstanko@1086: fieldLabel: i18n.getMsg('gueltigVon'), mstanko@1086: margin: '0, 30, 5, 5', mstanko@1086: labelWidth: 90, mstanko@1086: name: 'gueltigVon', mstanko@1086: format: 'd.m.Y', mstanko@1086: period: 'start' mstanko@1086: }, { mstanko@1086: xtype: 'datetime', mstanko@1086: fieldLabel: i18n.getMsg('gueltigBis'), mstanko@1086: margin: '0, 5, 5, 5', mstanko@1086: labelWidth: 40, mstanko@1086: name: 'gueltigBis', mstanko@1086: format: 'd.m.Y', mstanko@1086: period: 'end' dustin@757: }] dustin@757: }] dustin@757: }, { dustin@757: // Medium dustin@757: xtype: 'fieldset', dustin@757: title: i18n.getMsg('medium'), mstanko@1086: width: '100%', dustin@757: items: [{ dustin@757: border: 0, dustin@757: layout: { dustin@757: type: 'vbox', dustin@757: align: 'stretch' dustin@757: }, dustin@757: width: '100%', dustin@757: items: [{ dustin@757: xtype: 'umwelt', dustin@757: name: 'umwId', dustin@757: fieldLabel: i18n.getMsg('umwId'), dustin@757: labelWidth: 125, dustin@757: allowBlank: false, dustin@757: editable: true, dustin@757: listeners: { dustin@757: dirtychange: { dustin@757: fn: this.updateOnChange, dustin@757: scope: me dustin@757: } dustin@757: } dustin@757: }, { mstanko@1086: border: 0, mstanko@1086: layout: { mstanko@1086: type: 'hbox', mstanko@1086: align: 'stretch' mstanko@1086: }, mstanko@1086: width: '100%', mstanko@1086: items: [{ mstanko@1086: xtype: 'textfield', mstanko@1086: maxLength: 38, mstanko@1086: enforceMaxLength: true, mstanko@1086: name: 'mediaDesk', mstanko@1086: width: '60%', mstanko@1086: labelWidth: 125, mstanko@1086: fieldLabel: i18n.getMsg('mediaDesk'), mstanko@1086: editable: false, mstanko@1086: readOnly: true, mstanko@1086: listeners: { mstanko@1086: dirtychange: { mstanko@1086: fn: this.updateOnChange, mstanko@1086: scope: me mstanko@1086: } mstanko@1086: } mstanko@1086: }, { mstanko@1086: xtype: 'textfield', mstanko@1086: name: 'media', mstanko@1086: margin: '0, 10, 5, 10', mstanko@1086: width: '40%', mstanko@1086: enforceMaxLength: true, mstanko@1086: editable: false, mstanko@1086: readOnly: true mstanko@1086: }] mstanko@1086: }, { dustin@757: xtype: 'fieldset', dustin@757: title: i18n.getMsg('deskDetails'), dustin@757: collapsible: true, dustin@757: collapsed: true, dustin@757: defaultType: 'textfield', dustin@757: layout: { mstanko@1086: type: 'vbox', mstanko@1086: align: 'stretch' dustin@757: }, dustin@757: items: this.buildDescriptors(), dustin@757: listeners: { dustin@757: dirtychange: { dustin@757: fn: this.updateOnChange, dustin@757: scope: me dustin@757: } dustin@757: } dustin@757: }] dustin@757: }] dustin@757: }, { mstanko@1086: // Ort dustin@757: xtype: 'fieldset', mstanko@1086: title: 'Ort', dustin@757: layout: { dustin@757: type: 'hbox', dustin@757: align: 'stretch' dustin@757: }, mstanko@1086: width: '100%', dustin@757: items: [{ mstanko@1086: xtype: 'location', mstanko@1086: name: 'ortId', mstanko@1086: fieldLabel: i18n.getMsg('ortId'), mstanko@1086: labelWidth: 80, mstanko@1086: allowBlank: true, mstanko@1086: forceSelection: true, mstanko@1086: editable: false, mstanko@1086: columnWidth: '0.75' dustin@757: }, { mstanko@1086: xtype: 'button', mstanko@1086: name: 'ortIdButton', mstanko@1086: margin: '0 0 0 5', mstanko@1086: text: i18n.getMsg('messprogrammort.button.title'), mstanko@1086: action: 'ort', mstanko@1086: columnWidth: '0.25' dustin@757: }] mstanko@1086: }, { mstanko@1116: xtype: 'probenehmer', mstanko@1086: name: 'probeNehmerId', mstanko@1086: fieldLabel: i18n.getMsg('probeNehmerId'), mstanko@1116: margin: '0, 5, 5, 5', mstanko@1086: width: '100%', mstanko@1116: minValue: 0, mstanko@1086: anchor: '100%', mstanko@1116: labelWidth: 95 mstanko@1086: }, { mstanko@1086: xtype: 'textarea', mstanko@1086: name: 'probeKommentar', mstanko@1086: labelAlign: 'top', mstanko@1086: fieldLabel: i18n.getMsg('probeKommentar'), mstanko@1086: width: '100%', mstanko@1086: labelwidth: 135, mstanko@1086: anchor: '100%' dustin@757: }] dustin@757: }] dustin@757: }]; dustin@757: this.callParent(arguments); dustin@757: }, dustin@757: dustin@757: populateIntervall: function(record, intervall) { dustin@757: //intervall is an identifier of a intervall dustin@757: // for instance H, M, J, ... dustin@757: // Initialize the probenintervallslider dustin@757: var s = this.down('probenintervallslider'); dustin@774: var i = this.getForm().findField('intervallOffset'); dustin@757: var v = this.getForm().findField('teilintervallVon'); dustin@757: var b = this.getForm().findField('teilintervallBis'); dustin@757: var intervallstore = Ext.data.StoreManager.get('Probenintervall'); dustin@757: dustin@757: var svalUpper = null dustin@757: var svalLower = null dustin@759: var min = null dustin@759: var max = null dustin@757: dustin@757: if (!intervallstore) { dustin@757: intervallstore = Ext.create('Lada.store.Probenintervall'); dustin@757: } dustin@757: dustin@757: //It is likely that this method was not dustin@757: // called from the controller, dustin@757: //and the probenintervall was not changed. dustin@757: // Load the records in this case dustin@759: if (!intervall && record) { dustin@757: intervall = record.get('probenintervall', dustin@757: 0, false, false, true); dustin@757: dustin@757: svalUpper = record.get('teilintervallBis'); dustin@757: svalLower = record.get('teilintervallVon'); dustin@757: } dustin@757: dustin@757: dustin@757: var intrec = intervallstore dustin@757: .findRecord('probenintervall', dustin@757: intervall, 0, false, false, true); dustin@757: dustin@759: if (intrec) { // in cases when a new messprogramm is dustin@759: // created and the discard function is used, intrec will be null dustin@759: // consequently the assertion below will fail. dustin@759: min = intrec.get('periodstart'); dustin@759: max = intrec.get('periodend'); dustin@759: } dustin@757: dustin@757: if (!svalUpper) { dustin@757: svalUpper = max; dustin@757: } dustin@757: if (!svalLower) { dustin@757: svalLower = min; dustin@757: } dustin@757: dustin@757: //Set Teilintervalle dustin@757: v.setMinValue(min); dustin@757: v.setMaxValue(max); dustin@757: b.setMinValue(min); dustin@757: b.setMaxValue(max); dustin@757: dustin@757: //Set Slider dustin@757: s.setMinValue(min); dustin@757: s.setMaxValue(max); dustin@757: dustin@757: v.setValue(svalLower); dustin@757: b.setValue(svalUpper); dustin@757: dustin@774: //Set IntervallOffset dustin@774: i.setMinValue(0); dustin@774: i.setMaxValue(max-1); dustin@757: }, dustin@757: raimund@1067: setRecord: function(messRecord) { dustin@757: this.clearMessages(); raimund@1067: this.getForm().loadRecord(messRecord); dustin@757: //Set the intervall numberfields and the slider. dustin@757: this.down('probenintervallslider').setValue([ raimund@1067: messRecord.get('teilintervallVon'), raimund@1067: messRecord.get('teilintervallBis') dustin@757: ]); dustin@757: dustin@757: //TODO Set Sliders MinMaxValue raimund@1067: this.populateIntervall(messRecord); dustin@757: dustin@757: this.down('probenintervallslider').on( dustin@757: 'change', dustin@757: Lada.app.getController('Lada.controller.form.Messprogramm') dustin@757: .synchronizeFields dustin@757: ); raimund@1067: var mstStore = Ext.data.StoreManager.get('messstellen'); raimund@1067: if (!messRecord.get('owner')) { raimund@1067: var mstId = mstStore.getById(messRecord.get('mstId')); raimund@1071: if (!mstId) { raimund@1071: return; raimund@1071: } raimund@1067: var laborMstId = mstStore.getById(messRecord.get('laborMstId')); raimund@1067: if (laborMstId) { raimund@1067: laborMstId = laborMstId.get('messStelle'); raimund@1067: } raimund@1067: else { raimund@1067: laborMstId = ''; raimund@1067: } raimund@1067: var id = this.down('messstellelabor').store.count() + 1; ehuber@1108: if ( messRecord.get('mstId') === messRecord.get('laborMstId') ) { ehuber@1108: displayCombi = mstId.get('messStelle'); ehuber@1108: } else { ehuber@1108: displayCombi = mstId.get('messStelle') + '/' + laborMstId ehuber@1108: } ehuber@1108: var newStore = Ext.create('Ext.data.Store', { ehuber@1108: model: 'Lada.model.MessstelleLabor', ehuber@1108: data: [{ ehuber@1108: id: id, ehuber@1108: laborMst: messRecord.get('laborMstId'), ehuber@1108: messStelle: messRecord.get('mstId'), ehuber@1108: displayCombi: displayCombi ehuber@1108: }] ehuber@1108: }); raimund@1067: this.down('messstellelabor').down('combobox').store = newStore; raimund@1067: this.down('messstellelabor').setValue(id); raimund@1067: } raimund@1067: else { raimund@1067: var mstLaborStore = Ext.data.StoreManager.get('messstellelabor'); raimund@1067: var items = mstLaborStore.queryBy(function(record) { raimund@1067: if (record.get('messStelle') === messRecord.get('mstId') && raimund@1067: record.get('laborMst') === messRecord.get('laborMstId')) { raimund@1067: return true; raimund@1067: } raimund@1067: }); raimund@1067: this.down('messstellelabor').setValue(items.getAt(0)); raimund@1067: } raimund@784: }, dustin@757: raimund@784: setMediaDesk: function(record) { raimund@784: var media = record.get('mediaDesk').split(' '); raimund@784: this.setMediaSN(0, media); raimund@784: }, raimund@784: ehuber@1108: setMediaSN: function(ndx, media, beschreibung) { ehuber@1108: var mediabeschreibung = this.getForm().findField('media'); ehuber@1108: raimund@784: if (ndx >= 12) { ehuber@1108: mediabeschreibung.setValue(beschreibung); raimund@784: return; raimund@784: } raimund@784: var me = this; raimund@784: var current = this.down('deskriptor[layer=' + ndx + ']'); raimund@784: var cbox = current.down('combobox'); raimund@784: if (ndx === 0) { raimund@784: cbox.store.proxy.extraParams = { raimund@784: 'layer': ndx raimund@784: }; raimund@784: } raimund@784: else { raimund@784: var parents = current.getParents(current.down('combobox')); raimund@784: if (parents.length === 0) { raimund@784: return; raimund@784: } raimund@784: cbox.store.proxy.extraParams = { raimund@784: 'layer': ndx, raimund@784: 'parents': parents raimund@784: }; raimund@784: } raimund@784: cbox.store.load(function(records, op, success) { raimund@784: if (!success) { raimund@784: return; raimund@784: } raimund@784: cbox.select(cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10))); ehuber@1108: var mediatext = cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10)); ehuber@1108: if (mediatext !== null) { ehuber@1108: if ( (ndx <= 3) && (media[1] === '01') && (mediatext.data.beschreibung !== "leer") ) { ehuber@1108: beschreibung = mediatext.data.beschreibung; ehuber@1108: } else if ( (media[1] !== '01') && (mediatext.data.beschreibung !== "leer") && (ndx <= 1) ) { ehuber@1108: beschreibung = mediatext.data.beschreibung; ehuber@1108: } ehuber@1108: } ehuber@1108: me.setMediaSN(++ndx, media, beschreibung); raimund@784: }); dustin@757: }, dustin@757: dustin@757: setMessages: function(errors, warnings) { dustin@757: var key; dustin@757: var element; dustin@757: var content; dustin@757: var i18n = Lada.getApplication().bundle; dustin@757: if (warnings) { dustin@757: for (key in warnings) { dustin@757: element = this.down('component[name=' + key + ']'); dustin@757: if (!element) { dustin@757: continue; dustin@757: } dustin@757: content = warnings[key]; dustin@757: var warnText = ''; dustin@757: for (var i = 0; i < content.length; i++) { dustin@757: warnText += i18n.getMsg(content[i].toString()) + '\n'; dustin@757: } dustin@757: element.showWarnings(warnText); dustin@757: } dustin@757: } dustin@757: if (errors) { dustin@757: for (key in errors) { dustin@757: element = this.down('component[name=' + key + ']'); dustin@757: if (!element) { dustin@757: continue; dustin@757: } dustin@757: content = errors[key]; dustin@757: var errorText = ''; dustin@757: for (var i = 0; i < content.length; i++) { dustin@757: errorText += i18n.getMsg(content[i].toString()) + '\n'; dustin@757: } dustin@757: element.showErrors(errorText); dustin@757: } dustin@757: } dustin@757: }, dustin@757: dustin@757: clearMessages: function() { dustin@757: // TODO raimund@1068: this.down('cbox[name=mstlabor]').clearWarningOrError(); dustin@777: this.down('tfield[name=name]').clearWarningOrError(); dustin@777: //no clearmsg for probeKommentar dustin@777: this.down('cbox[name=datenbasisId]').clearWarningOrError(); dustin@777: this.down('cbox[name=baId]').clearWarningOrError(); mstanko@1086: this.down('chkbox[name=test]').clearWarningOrError(); dustin@777: this.down('cbox[name=probenartId]').clearWarningOrError(); dustin@777: this.down('cbox[name=netzbetreiberId]').clearWarningOrError(); tom@1167: // clear messages in intervall definition tom@1167: this.down('fset[name=probenIntervallFieldset]').clearMessages(); tom@1167: this.down('cbox[name=probenintervall]').clearWarningOrError(); tom@1167: this.down('fset[name=gueltigPeriodFieldset]').clearMessages(); tom@1168: this.down('numfield[name=teilintervallVon]').clearWarningOrError(); tom@1168: this.down('numfield[name=teilintervallBis]').clearWarningOrError(); tom@1167: this.down('datetime[name=gueltigVon]').clearWarningOrError(); tom@1167: this.down('datetime[name=gueltigBis]').clearWarningOrError(); dustin@777: //no clear for probeNehmerId dustin@777: // Deskriptoren are missing dustin@777: this.down('cbox[name=umwId]').clearWarningOrError(); tom@1167: this.down('cbox[name=ortId]').clearWarningOrError(); dustin@757: }, dustin@757: dustin@757: setReadOnly: function(value) { dustin@757: // TODO dustin@757: }, dustin@757: dustin@757: buildDescriptors: function() { dustin@757: var fields = []; dustin@757: for (var i = 0; i < 12; i++) { dustin@757: fields[i] = { raimund@784: xtype: 'deskriptor', dustin@757: fieldLabel: 'S' + i, dustin@757: labelWidth: 25, raimund@784: width: 190, raimund@784: layer: i, dustin@757: margin: '0, 10, 5, 0' dustin@757: }; dustin@757: } dustin@757: return fields; dustin@757: } dustin@757: });