dustin@581: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz dustin@581: * Software engineering by Intevation GmbH dustin@581: * dustin@581: * This file is Free Software under the GNU GPL (v>=3) dustin@581: * and comes with ABSOLUTELY NO WARRANTY! Check out dustin@581: * the documentation coming with IMIS-Labordaten-Application for details. dustin@581: */ dustin@581: dustin@581: /* dustin@581: * Formular to edit a Messung dustin@581: */ dustin@581: Ext.define('Lada.view.form.Messung', { dustin@581: extend: 'Ext.form.Panel', dustin@581: alias: 'widget.messungform', dustin@581: requires: [ dustin@581: 'Lada.view.widget.Datenbasis', dustin@611: 'Lada.view.widget.base.CheckBox', dustin@611: 'Lada.view.widget.Messmethode', dustin@581: 'Lada.view.widget.base.TextField', dustin@581: 'Lada.view.widget.base.Datetime', dustin@581: ], dustin@581: dustin@581: model: 'Lada.model.Messung', dustin@581: minWidth: 650, dustin@581: margin: 5, dustin@581: border: 0, dustin@581: dustin@581: recordId: null, dustin@581: dustin@581: trackResetOnLoad: true, dustin@581: raimund@589: initComponent: function() { dustin@611: var me = this; dustin@581: this.items = [{ dustin@581: xtype: 'fieldset', dustin@611: title: 'Allgemein', dustin@611: items: [{ dustin@611: border: 0, dustin@611: margin: '0, 0, 10, 0', dustin@611: layout: { dustin@611: type: 'table', dustin@611: columns: 2 dustin@611: }, dustin@611: dockedItems: [{ dustin@611: xtype: 'toolbar', dustin@611: dock: 'bottom', dustin@611: border: '0, 1, 1, 1', dustin@611: style: { dustin@611: borderBottom: '1px solid #b5b8c8 !important', dustin@611: borderLeft: '1px solid #b5b8c8 !important', dustin@611: borderRight: '1px solid #b5b8c8 !important' dustin@611: }, dustin@611: items: ['->', { dustin@611: text: 'Speichern', dustin@611: qtip: 'Daten speichern', dustin@611: icon: 'resources/img/dialog-ok-apply.png', dustin@611: action: 'save', dustin@611: disabled: true dustin@611: }, { dustin@611: text: 'Verwerfen', dustin@611: qtip: 'Ă„nderungen verwerfen', dustin@611: icon: 'resources/img/dialog-cancel.png', dustin@611: action: 'discard', dustin@611: disabled: true dustin@611: }] dustin@611: }], dustin@611: items: [{ dustin@611: xtype: 'textfield', dustin@611: name: 'nebenprobenNr', dustin@611: maxLength: 10, dustin@611: margin: '0, 10, 5, 0', dustin@611: fieldLabel: 'Nebenprobennr.', dustin@611: width: 300, dustin@611: labelWidth: 100, dustin@611: }, { dustin@611: xtype: 'messmethode', dustin@611: name: 'mmtId', dustin@611: margin: '0, 10, 5, 0', dustin@611: fieldLabel: 'Messmethode', dustin@611: width: 300, dustin@611: labelWidth: 100, dustin@611: }, { dustin@611: xtype: 'datetime', dustin@611: name: 'messzeitpunkt', dustin@611: margin: '0, 10, 5, 0', dustin@611: fieldLabel: 'Messzeitpunkt', dustin@611: width: 300, dustin@611: labelWidth: 100, dustin@611: }, { dustin@611: xtype: 'numberfield', dustin@611: allowDecimals: false, dustin@611: minValue: 0, dustin@611: name: 'messdauer', dustin@611: margin: '0, 10, 5, 0', dustin@611: fieldLabel: 'Messdauer', dustin@611: width: 300, dustin@611: labelWidth: 100, dustin@611: }, { dustin@611: xtype: 'chkbox', dustin@611: name: 'fertig', dustin@611: margin: '0, 10, 5, 0', dustin@611: fieldLabel: 'Fertig', dustin@611: width: 300, dustin@611: labelWidth: 100, dustin@611: }, { dustin@611: xtype: 'chkbox', dustin@611: name: 'geplant', dustin@611: margin: '0, 10, 5, 0', dustin@611: fieldLabel: 'Geplant', dustin@611: width: 300, dustin@611: labelWidth: 100, dustin@611: }] dustin@611: }] dustin@581: }]; dustin@581: this.callParent(arguments); dustin@581: }, dustin@581: raimund@589: setRecord: function(record) { dustin@581: this.getForm().loadRecord(record); dustin@581: }, dustin@581: dustin@581: setMessages: function() { raimund@589: // TODO this is a stub dustin@581: }, dustin@581: dustin@581: clearMessages: function() { raimund@589: // TODO this is a stub dustin@581: }, dustin@581: raimund@589: setReadonly: function() { raimund@589: // TODO this is a stub dustin@581: } dustin@581: });