torsten@18: Ext.define('Lada.view.proben.Edit', { torsten@18: extend: 'Ext.window.Window', torsten@18: alias: 'widget.probenedit', torsten@18: 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@47: width: Ext.getBody().getViewSize().width - 30, torsten@47: height: Ext.getBody().getViewSize().height - 30, torsten@18: autoShow: true, torsten@25: autoScroll: true, torsten@25: modal: true, torsten@18: torsten@40: requires: [ torsten@71: 'Lada.view.proben.EditForm', torsten@42: 'Lada.view.widgets.Uwb', torsten@41: 'Lada.view.widgets.Datenbasis', torsten@46: 'Lada.view.widgets.Probenart', torsten@49: 'Lada.view.widgets.Betriebsart', torsten@53: 'Lada.view.widgets.Testdatensatz', torsten@91: 'Lada.view.widgets.Netzbetreiber', torsten@53: 'Lada.view.kommentare.List' torsten@40: ], torsten@40: torsten@18: initComponent: function() { 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. torsten@71: var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig); torsten@71: // Load kommentare torsten@71: //var record = form.getRecord(); torsten@71: var kommentare = form.down('kommentarelist'); //form.down('kommentare'); torsten@71: var kstore = kommentare.getStore(); torsten@71: kstore.load({ torsten@71: params: { torsten@71: probe: this.initialConfig['modelId'] torsten@71: //probe: record.data['probeId'] torsten@18: } torsten@71: }); torsten@71: this.items = [form]; torsten@18: this.buttons = [ torsten@18: { torsten@18: text: 'Speichern', torsten@71: handler: form.commit, torsten@71: scope: form torsten@18: } torsten@18: ]; torsten@71: this.callParent(); torsten@18: } torsten@18: }); torsten@22: