[Lada-commits] [PATCH 1 of 4] Added window for creating probe objects

Wald Commits scm-commit at wald.intevation.org
Mon Mar 16 12:11:15 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426504157 -3600
# Node ID 7a7a16b0a54828069b1520fbbefc592de485e39d
# Parent  dfc07fa0ceb1fb5bc261f1883a5363e57f77d7fc
Added window for creating probe objects.

diff -r dfc07fa0ceb1 -r 7a7a16b0a548 app/view/window/ProbeCreate.js
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/window/ProbeCreate.js	Mon Mar 16 12:09:17 2015 +0100
@@ -0,0 +1,62 @@
+/* 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 Probe
+ */
+Ext.define('Lada.view.window.ProbeCreate', {
+    extend: 'Ext.window.Window',
+    alias: 'widget.probecreate',
+
+    requires: [
+        'Lada.view.form.Probe'
+    ],
+
+    collapsible: true,
+    maximizable: true,
+    autoShow: true,
+    autoScroll: true,
+    layout: 'fit',
+
+    record: null,
+
+    initComponent: function() {
+        this.title = '§3-Probe';
+        this.buttons = [{
+            text: 'Schließen',
+            scope: this,
+            handler: this.close
+        }];
+        this.width = 700;
+        // InitialConfig is the config object passed to the constructor on
+        // creation of this window. We need to pass it throuh to the form as
+        // we need the "modelId" param to load the correct item.
+
+        this.items = [{
+            border: 0,
+            autoScroll: true,
+            items: [{
+                xtype: 'probeform'
+            }]
+        }];
+        this.callParent(arguments);
+    },
+
+    initData: function() {
+        var record = Ext.create('Lada.model.Probe');
+        this.down('probeform').setRecord(record);
+    },
+
+    setMessages: function(errors, warnings) {
+        this.down('probeform').setMessages(errors, warnings);
+    },
+
+    clearMessages: function() {
+        this.down('probeform').clearMessages();
+    }
+});


More information about the Lada-commits mailing list