dustin@576: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz dustin@576: * Software engineering by Intevation GmbH dustin@576: * dustin@576: * This file is Free Software under the GNU GPL (v>=3) dustin@576: * and comes with ABSOLUTELY NO WARRANTY! Check out dustin@576: * the documentation coming with IMIS-Labordaten-Application for details. dustin@576: */ dustin@576: dustin@576: /* dustin@576: * Window to edit a Messung dustin@576: */ dustin@576: Ext.define('Lada.view.window.MessungEdit', { dustin@576: extend: 'Ext.window.Window', dustin@576: alias: 'widget.messungedit', dustin@576: dustin@576: // requires: [ dustin@576: // 'Lada.view.form.Messung', dustin@576: // 'Lada.view.grid.Messwert', dustin@576: // 'Lada.view.grid.Messstatus', dustin@576: // 'Lada.view.grid.MKommentar' dustin@576: // ], dustin@576: dustin@576: collapsible: true, dustin@576: maximizable: true, dustin@576: autoshow: true, dustin@576: autoscroll: true, dustin@576: layout: 'fit', dustin@576: dustin@576: record: null, dustin@576: dustin@576: initComponent: function(){ dustin@576: if (this.record === null) { dustin@576: Ext.Msg.alert('Keine valide Messung ausgewählt!'); dustin@576: this.callParent(arguments); dustin@576: return; dustin@576: } dustin@576: this.title = 'Messung ';// + this.record.get('messungId'); dustin@576: this.buttons = [{ dustin@576: text: 'Schließen', dustin@576: scope: this, dustin@576: handler: this.close dustin@576: }]; dustin@576: this.width = 700; dustin@576: this.height = Ext.getBody().getViewSize().height - 30; dustin@576: dustin@576: this.items = [{ dustin@576: border: 0, dustin@576: autoScroll: true, dustin@576: items: [{ dustin@576: // xtype: 'messungform', dustin@576: // recordId: record.get('id') dustin@576: }, { dustin@576: xtype: 'fset', dustin@576: name: 'messwerte', dustin@576: title: 'Messwerte - Stub' dustin@576: //todo dustin@576: }, { dustin@576: xtype: 'fset', dustin@576: name: 'messungstatus', dustin@576: title: 'Messungstatus - Stub' dustin@576: //todo dustin@576: }, { dustin@576: xtype: 'fset', dustin@576: name: 'messungskommentare', dustin@576: title: 'Messungskommentare - Stub' dustin@576: //todo dustin@576: }] dustin@576: }]; dustin@576: this.callParent(arguments); dustin@576: }, dustin@576: dustin@576: initData: function() { dustin@576: this.clearMessages(); dustin@576: Ext.ClassManager.get('Lada.model.Messung').load(this.record.get('id'), { dustin@576: failure: function(record, action){ dustin@576: // todo dustin@576: console.log("failure"); dustin@576: }, dustin@576: success: function(record, action){ dustin@576: console.log("success"); dustin@576: }, dustin@576: scope: this dustin@576: } dustin@576: ); dustin@576: }, dustin@576: dustin@576: setMessages: function(errors, warnings) { dustin@576: //todo this is a stub dustin@576: }, dustin@576: clearMessages: function() { dustin@576: //todo this is a stub dustin@576: } dustin@576: dustin@576: });