torsten@472: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz torsten@472: * Software engineering by Intevation GmbH torsten@472: * torsten@472: * This file is Free Software under the GNU GPL (v>=3) torsten@472: * and comes with ABSOLUTELY NO WARRANTY! Check out raimund@497: * the documentation coming with IMIS-Labordaten-Application for details. torsten@472: */ torsten@472: torsten@348: /* torsten@348: * Window to edit a Probe torsten@348: */ torsten@18: Ext.define('Lada.view.proben.Edit', { torsten@18: extend: 'Ext.window.Window', torsten@18: alias: 'widget.probenedit', torsten@18: raimund@498: requires: [ raimund@498: 'Lada.view.proben.EditForm' raimund@498: ], raimund@498: torsten@18: title: 'Maske für §3-Proben', torsten@47: // Make size of the dialog dependend of the available space. torsten@47: // TODO: Handle resizing the browser window. torsten@18: autoShow: true, torsten@25: autoScroll: true, torsten@25: modal: true, raimund@503: layout: 'fit', torsten@18: torsten@18: initComponent: function() { raimund@491: this.buttons = [{ raimund@491: text: 'Speichern', raimund@491: action: 'save' raimund@491: }, { raimund@491: text: 'Abbrechen', raimund@491: scope: this, raimund@491: handler: this.close raimund@491: }]; raimund@503: this.width = 700// Ext.getBody().getViewSize().width - 30; raimund@479: this.height = Ext.getBody().getViewSize().height - 30; torsten@71: // InitialConfig is the config object passed to the constructor on torsten@71: // creation of this window. We need to pass it throuh to the form as torsten@71: // we need the "modelId" param to load the correct item. raimund@503: raimund@503: /* raimund@503: this.items = [{ raimund@503: xtype: 'fieldset', raimund@503: title: 'Probenangaben', raimund@503: layout: 'hbox', raimund@503: defaults: { raimund@503: labelWidth: 150 raimund@503: }, raimund@503: items: [{ raimund@503: layout: 'vbox', raimund@503: border: 0, raimund@503: items: [{ raimund@503: xtype: 'mst', raimund@503: name: 'mstId', raimund@503: fieldLabel: 'Messstelle', raimund@503: allowBlank: false raimund@503: }, { raimund@503: xtype: 'textfield', raimund@503: name: 'hauptprobenNr', raimund@503: maxLength: 20, raimund@503: fieldLabel: 'Hauptprobennr.' raimund@503: }] raimund@503: }] raimund@503: */ raimund@503: /* raimund@503: items: [{ raimund@503: layout: 'hbox', raimund@503: border: 0, raimund@503: items: [{ raimund@503: layout: 'vbox', raimund@503: border: 0, raimund@503: items: [{ raimund@503: xtype: 'mst', raimund@503: name: 'mstId', raimund@503: fieldLabel: 'Messstelle', raimund@503: allowBlank: false raimund@503: }, { raimund@503: xtype: 'textfield', raimund@503: name: 'hauptprobenNr', raimund@503: maxLength: 20, raimund@503: fieldLabel: 'Hauptprobennr.' raimund@503: }] raimund@503: }, { raimund@503: xtype: 'fieldset', raimund@503: title: 'Erweiterte Probenangaben', raimund@503: collapsible: true, raimund@503: collapsed: true, raimund@503: items: [{ raimund@503: xtype: 'datenbasis', raimund@503: id: 'datenbasis', raimund@503: editable: false, raimund@503: name: 'datenbasisId', raimund@503: fieldLabel: 'Datenbasis' raimund@503: }, { raimund@503: xtype: 'betriebsart', raimund@503: name: 'baId', raimund@503: fieldLabel: 'Betriebsart' raimund@503: }, { raimund@503: xtype: 'testdatensatz', raimund@503: name: 'test', raimund@503: fieldLabel: 'Testdatensatz', raimund@503: allowBlank: false raimund@503: }, { raimund@503: xtype: 'probenart', raimund@503: id: 'probenart', raimund@503: editable: false, raimund@503: name: 'probenartId', raimund@503: fieldLabel: 'Probenart', raimund@503: allowBlank: false raimund@503: }, { raimund@503: xtype: 'numberfield', raimund@503: allowDecimals: false, raimund@503: name: 'probeNehmerId', raimund@503: fieldLabel: 'Probennehmer' raimund@503: }, { raimund@503: xtype: 'netzbetreiber', raimund@503: name: 'netzbetreiberId', raimund@503: editable: false, raimund@503: fieldLabel: 'Netzbetreiber', raimund@503: allowBlank: false raimund@503: }, { raimund@503: xtype: 'textfield', raimund@503: name: 'x11', raimund@503: fieldLabel: 'Datensatzerzeuger' raimund@503: }] raimund@503: }] raimund@503: }] raimund@503: */ raimund@503: // }]; raimund@491: var form = Ext.create('Lada.view.proben.EditForm', raimund@491: this.initialConfig); raimund@503: this.items = [{ raimund@503: border: 0, raimund@503: autoScroll: true, raimund@503: items: [form] raimund@503: }]; raimund@503: this.callParent(arguments); rrenkert@422: } torsten@18: });