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@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@121: /// Load kommentare torsten@121: ////var record = form.getRecord(); torsten@121: //var kommentare = form.down('kommentarelist'); //form.down('kommentare'); torsten@121: //var kstore = kommentare.getStore(); torsten@121: //kstore.load({ torsten@121: // params: { torsten@121: // probe: this.initialConfig['modelId'] torsten@121: // //probe: record.data['probeId'] torsten@121: // } torsten@121: //}); torsten@121: //// Load Orte torsten@121: //var orte = form.down('ortelist'); torsten@121: //var ostore = orte.getStore(); torsten@121: //ostore.load({ torsten@121: // params: { torsten@121: // probe: this.initialConfig['modelId'] torsten@121: // //probe: record.data['probeId'] torsten@121: // } torsten@121: //}); torsten@121: //// Load Messungen torsten@121: //var messungen = form.down('messungenlist'); torsten@121: //var mstore = messungen.getStore(); torsten@121: //mstore.load({ torsten@121: // params: { torsten@121: // probe: this.initialConfig['modelId'] torsten@121: // //probe: record.data['probeId'] torsten@121: // } torsten@121: //}); 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: