changeset 508:ae8582b4f207

Refactored messung edit window layout (LSB 3.8).
author Raimund Renkert <raimund.renkert@intevation.de>
date Sat, 13 Dec 2014 14:11:43 +0100
parents 0c277c02eaef
children 4ac3eee22f96
files app/view/messungen/Edit.js app/view/messungen/EditForm.js
diffstat 2 files changed, 52 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/messungen/Edit.js	Sat Dec 13 14:10:40 2014 +0100
+++ b/app/view/messungen/Edit.js	Sat Dec 13 14:11:43 2014 +0100
@@ -18,8 +18,7 @@
 
     title: 'Maske für Messungen',
     autoShow: true,
-    autoScroll: true,
-    modal: true,
+    layout: 'fit',
 
     initComponent: function() {
         var form = Ext.create('Lada.view.messungen.EditForm',
@@ -33,9 +32,13 @@
             scope: this,
             handler: this.close
         }];
-        this.width = Ext.getBody().getViewSize().width - 30;
-        this.height = Ext.getBody().getViewSize().height - 30;
-        this.items = [form];
+        this.width = 700;
+        this.maxHeight = Ext.getBody().getViewSize().height - 57;
+        this.items = [{
+            border: 0,
+            autoScroll: true,
+            items: [form]
+        }];
         this.callParent();
     }
 });
--- a/app/view/messungen/EditForm.js	Sat Dec 13 14:10:40 2014 +0100
+++ b/app/view/messungen/EditForm.js	Sat Dec 13 14:11:43 2014 +0100
@@ -21,35 +21,53 @@
     ],
 
     model: 'Lada.model.Messung',
+    minWidth: 650,
 
     initComponent: function() {
         this.items = [{
-            xtype: 'textfield',
-            name: 'nebenprobenNr',
-            maxLength: 10,
-            fieldLabel: 'NPR'
-        }, {
-            xtype: 'messmethode',
-            name: 'mmtId',
-            fieldLabel: 'MMT'
-        }, {
-            xtype: 'datetime',
-            name: 'messzeitpunkt',
-            fieldLabel: 'Messzeitpunkt'
-        }, {
-            xtype: 'numberfield',
-            allowDecimals: false,
-            minValue: 0,
-            name: 'messdauer',
-            fieldLabel: 'Messdauer'
-        }, {
-            xtype: 'testdatensatz',
-            name: 'fertig',
-            fieldLabel: 'Fertig'
-        }, {
-            xtype: 'testdatensatz',
-            name: 'geplant',
-            fieldLabel: 'Geplant'
+            xtype: 'fieldset',
+            title: 'Allgemein',
+            items: [{
+                layout: {
+                    type: 'table',
+                    columns: 2
+                },
+                border: 0,
+                items: [{
+                    xtype: 'textfield',
+                    name: 'nebenprobenNr',
+                    maxLength: 10,
+                    margin: '0, 10, 5, 0',
+                    fieldLabel: 'Nebenprobennr.'
+                }, {
+                    xtype: 'messmethode',
+                    name: 'mmtId',
+                    margin: '0, 10, 5, 0',
+                    fieldLabel: 'Messmethode'
+                }, {
+                    xtype: 'datetime',
+                    name: 'messzeitpunkt',
+                    margin: '0, 10, 5, 0',
+                    fieldLabel: 'Messzeitpunkt'
+                }, {
+                    xtype: 'numberfield',
+                    allowDecimals: false,
+                    minValue: 0,
+                    name: 'messdauer',
+                    margin: '0, 10, 5, 0',
+                    fieldLabel: 'Messdauer'
+                }, {
+                    xtype: 'testdatensatz',
+                    name: 'fertig',
+                    margin: '0, 10, 5, 0',
+                    fieldLabel: 'Fertig'
+                }, {
+                    xtype: 'testdatensatz',
+                    name: 'geplant',
+                    margin: '0, 10, 5, 0',
+                    fieldLabel: 'Geplant'
+                }]
+            }]
         }, {
             // Messwerte
             xtype: 'fieldset',

http://lada.wald.intevation.org