torsten@12: Ext.define('Lada.view.Viewport' ,{ torsten@12: extend: 'Ext.container.Viewport', torsten@12: requires: [ torsten@28: 'Lada.view.search.List', torsten@31: 'Lada.view.search.Query1', torsten@31: 'Lada.view.search.Query2', torsten@120: 'Lada.view.proben.List' torsten@12: ], torsten@173: torsten@12: initComponent: function() { torsten@12: console.log('Setting up Viewport'); torsten@184: this.initSearch(); torsten@173: torsten@173: // Development related: torsten@173: // Disable "initSearch" call and enable one of the following init torsten@173: // methods to get a dialog directly without the need to click through torsten@173: // the whole application. torsten@180: //this.initOrt(); torsten@184: //this.initMessung(); torsten@184: //this.initMesswert(); torsten@173: torsten@173: this.callParent(arguments); torsten@173: }, torsten@180: initMesswert: function() { torsten@180: var store = Ext.getStore('Messwerte'); torsten@180: store.load({ torsten@180: params: { torsten@180: probeId: "000007575853X", torsten@180: messungsId: "1" torsten@184: }, torsten@184: callback: function() { torsten@184: var model = store.data.items[0]; torsten@184: var win = Ext.create('Lada.view.messwerte.Create', {model: model}); torsten@180: } torsten@180: }); torsten@180: }, torsten@180: initOrt: function() { torsten@180: var ort = Ext.create('Lada.model.Ort'); torsten@180: var win = Ext.create('Lada.view.orte.Create', {model: ort}); torsten@180: }, torsten@173: initMessung: function() { torsten@180: var store = Ext.getStore('Messungen'); torsten@180: var kstore = Ext.getStore('MKommentare'); torsten@184: var mstore = Ext.getStore('Messwerte'); torsten@184: var sstore = Ext.getStore('Status'); torsten@180: probeId = "000007578314X"; torsten@180: store.load({ torsten@180: params: { torsten@180: probeId: probeId torsten@180: }, torsten@180: callback: function () { torsten@180: console.log(store); torsten@180: var messung = store.data.items[0]; torsten@180: console.log(store.data.items[0]); torsten@180: kstore.load({ torsten@180: params: { torsten@180: probeId: probeId, torsten@180: messungsId: messung.get('messungsId') torsten@180: } torsten@180: }); torsten@184: sstore.load({ torsten@184: params: { torsten@184: probeId: probeId, torsten@184: messungsId: messung.get('messungsId') torsten@184: } torsten@184: }); torsten@184: mstore.load({ torsten@184: params: { torsten@184: probeId: probeId, torsten@184: messungsId: messung.get('messungsId') torsten@184: } torsten@184: }); torsten@184: console.log('Creating Messung window'); torsten@184: //var messung = Ext.create('Lada.model.Messung'); torsten@184: var win = Ext.create('Lada.view.messungen.Create', {model: messung}); torsten@180: } torsten@180: }); torsten@173: }, torsten@173: initSearch: function() { torsten@12: this.items = { torsten@25: xtype: 'panel', torsten@25: title: '