[Lada-commits] [PATCH 1 of 4] Added a blank window to edit a Messung

Wald Commits scm-commit at wald.intevation.org
Tue Mar 10 15:32:50 CET 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1425997607 -3600
# Node ID 0d4137e0fe3608c288d186d5a82565179077dd11
# Parent  d9593b520b3b649d76973935062596ab9b074185
Added a blank window to edit a Messung

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


More information about the Lada-commits mailing list