changeset 505:5d958fb1dd26

Refactored proben create window layout. (LSB 3.8)
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 12 Dec 2014 12:19:49 +0100
parents 44e054626bdd
children 2b5aa0e6e641
files app/view/proben/Create.js app/view/proben/CreateForm.js
diffstat 2 files changed, 105 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/proben/Create.js	Fri Dec 12 12:18:22 2014 +0100
+++ b/app/view/proben/Create.js	Fri Dec 12 12:19:49 2014 +0100
@@ -18,11 +18,10 @@
     ],
 
     title: 'Maske für §3-Proben',
-    // Make size of the dialog dependend of the available space.
-    // TODO: Handle resizing the browser window.
     autoShow: true,
     autoScroll: true,
     modal: true,
+    layout: 'fit',
 
     initComponent: function() {
         this.buttons = [{
@@ -33,10 +32,13 @@
             scope: this,
             handler: this.close
         }];
-        this.width = Ext.getBody().getViewSize().width - 30;
-        this.height = Ext.getBody().getViewSize().height - 30;
+        this.width = 700;
         var form = Ext.create('Lada.view.proben.CreateForm');
-        this.items = [form];
+        this.items = [{
+            border: 0,
+            autoScroll: true,
+            items: [form]
+        }];
         this.callParent(arguments);
     }
 });
--- a/app/view/proben/CreateForm.js	Fri Dec 12 12:18:22 2014 +0100
+++ b/app/view/proben/CreateForm.js	Fri Dec 12 12:19:49 2014 +0100
@@ -31,53 +31,67 @@
                     labelWidth: 150
             },
             items: [{
-                xtype: 'mst',
-                name: 'mstId',
-                fieldLabel: 'Messstelle',
-                allowBlank: false
-            }, {
-                xtype: 'textfield',
-                name: 'hauptprobenNr',
-                maxLength: 20,
-                fieldLabel: 'Hauptprobennr.'
-            }, {
-                xtype: 'fieldset',
-                title: 'Erweiterte Probenangaben',
-                collapsible: true,
-                collapsed: false,
+                layout: 'hbox',
+                border: 0,
                 items: [{
-                    xtype: 'datenbasis',
-                    id: 'datenbasis',
-                    editable: false,
-                    name: 'datenbasisId',
-                    fieldLabel: 'Datenbasis'
+                    border: 0,
+                    width: '43%',
+                    minWidth: 290,
+                    items: [{
+                        xtype: 'mst',
+                        name: 'mstId',
+                        fieldLabel: 'Messstelle',
+                        allowBlank: false
+                    }, {
+                        xtype: 'textfield',
+                        name: 'hauptprobenNr',
+                        maxLength: 20,
+                        fieldLabel: 'Hauptprobennr.'
+                    }]
                 }, {
-                    xtype: 'betriebsart',
-                    name: 'baId',
-                    fieldLabel: 'Betriebsart'
-                }, {
-                    xtype: 'testdatensatz',
-                    name: 'test',
-                    fieldLabel: 'Testdatensatz',
-                    allowBlank: false
-                }, {
-                    xtype: 'probenart',
-                    id: 'probenart',
-                    editable: false,
-                    name: 'probenartId',
-                    fieldLabel: 'Probenart',
-                    allowBlank: false
-                }, {
-                    xtype: 'numberfield',
-                    allowDecimals: false,
-                    name: 'probeNehmerId',
-                    fieldLabel: 'Probennehmer'
-                }, {
-                    xtype: 'netzbetreiber',
-                    name: 'netzbetreiberId',
-                    fieldLabel: 'Netzbetreiber',
-                    editable: false,
-                    allowBlank: false
+                    border: 0,
+                    width: '52%',
+                    minWidth: 300,
+                    items: [{
+                        xtype: 'fieldset',
+                        title: 'Erweiterte Probenangaben',
+                        collapsible: true,
+                        collapsed: true,
+                        items: [{
+                            xtype: 'datenbasis',
+                            id: 'datenbasis',
+                            editable: false,
+                            name: 'datenbasisId',
+                            fieldLabel: 'Datenbasis'
+                        }, {
+                            xtype: 'betriebsart',
+                            name: 'baId',
+                            fieldLabel: 'Betriebsart'
+                        }, {
+                            xtype: 'testdatensatz',
+                            name: 'test',
+                            fieldLabel: 'Testdatensatz',
+                            allowBlank: false
+                        }, {
+                            xtype: 'probenart',
+                            id: 'probenart',
+                            editable: false,
+                            name: 'probenartId',
+                            fieldLabel: 'Probenart',
+                            allowBlank: false
+                        }, {
+                            xtype: 'numberfield',
+                            allowDecimals: false,
+                            name: 'probeNehmerId',
+                            fieldLabel: 'Probennehmer'
+                        }, {
+                            xtype: 'netzbetreiber',
+                            name: 'netzbetreiberId',
+                            fieldLabel: 'Netzbetreiber',
+                            editable: false,
+                            allowBlank: false
+                        }]
+                    }]
                 }]
             }]
         }, {
@@ -88,27 +102,38 @@
                     labelWidth: 150
             },
             items: [{
-                xtype: 'uwb',
-                name: 'umwId',
-                fieldLabel: 'Umweltbereich',
-                allowBlank: false
-            }, {
-                xtype: 'textfield',
-                maxLength: 100,
-                name: 'media',
-                fieldLabel: 'Medienbezeichnung'
-            }, {
-                xtype: 'textfield',
-                maxLength: 100,
-                name: 'mediaDesk',
-                fieldLabel: 'Deskriptoren'
-            }, {
-                xtype: 'fieldset',
-                title: 'Details Deskriptoren',
-                collapsible: true,
-                collapsed: true,
-                defaultType: 'textfield',
-                items: this.buildDescriptors()
+                border: 0,
+                layout: {
+                    type: 'vbox',
+                    align: 'stretch'
+                },
+                items: [{
+                    xtype: 'uwb',
+                    name: 'umwId',
+                    fieldLabel: 'Umweltbereich',
+                    allowBlank: false
+                }, {
+                    xtype: 'textfield',
+                    maxLength: 100,
+                    name: 'media',
+                    fieldLabel: 'Medienbezeichnung'
+                }, {
+                    xtype: 'textfield',
+                    maxLength: 100,
+                    name: 'mediaDesk',
+                    fieldLabel: 'Deskriptoren'
+                }, {
+                    xtype: 'fieldset',
+                    title: 'Details Deskriptoren',
+                    collapsible: true,
+                    collapsed: true,
+                    defaultType: 'textfield',
+                    layout: {
+                        type: 'table',
+                        columns: 3
+                    },
+                    items: this.buildDescriptors()
+                }]
             }]
         }, {
             // Zeit
@@ -118,16 +143,20 @@
             defaults: {
                     labelWidth: 150
             },
+            layout: {
+                type: 'table',
+                columns: 2
+            },
             items: [{
                 fieldLabel: 'Probennahme Beginn',
                 name: 'probeentnahmeBeginn'
             }, {
+                fieldLabel: 'Sollzeit Von',
+                name: 'solldatumBeginn'
+            }, {
                 fieldLabel: 'Probennahme Ende',
                 name: 'probeentnahmeEnde'
             }, {
-                fieldLabel: 'Sollzeit Von',
-                name: 'solldatumBeginn'
-            }, {
                 fieldLabel: 'Sollzeit Bis',
                 name: 'solldatumEnde'
             }]

http://lada.wald.intevation.org