[Lada-commits] [PATCH 2 of 6] Refactored proben create window layout. (LSB 3.8)
Wald Commits
scm-commit at wald.intevation.org
Sat Dec 13 14:13:52 CET 2014
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1418383189 -3600
# Node ID 5d958fb1dd2686e73feb557fa5af28961db52206
# Parent 44e054626bdd726782c76f4c6890bb607883fa85
Refactored proben create window layout. (LSB 3.8)
diff -r 44e054626bdd -r 5d958fb1dd26 app/view/proben/Create.js
--- 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);
}
});
diff -r 44e054626bdd -r 5d958fb1dd26 app/view/proben/CreateForm.js
--- 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'
}]
More information about the Lada-commits
mailing list