changeset 1320:3a3148d50b9c

Use new combobox widgets as input elements in create ort window.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 03 Feb 2017 14:30:16 +0100
parents cc90b8050887
children f1e348109ebb
files app/view/form/Ortserstellung.js app/view/widget/Kta.js app/view/widget/OrtTyp.js
diffstat 3 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/form/Ortserstellung.js	Fri Feb 03 13:18:12 2017 +0100
+++ b/app/view/form/Ortserstellung.js	Fri Feb 03 14:30:16 2017 +0100
@@ -132,7 +132,7 @@
             fieldLabel: i18n.getMsg('orte.berichtstext'),
             name: 'berichtstext'
         }, {
-            xtype: 'tfield',
+            xtype: 'kta',
             labelWidth: 125,
             maxLength: 100,
             name: 'anlageId',
@@ -150,7 +150,7 @@
             name: 'sektor',
             fieldLabel: i18n.getMsg('orte.sektor')
         },{
-            xtype: 'tfield',
+            xtype: 'orttyp',
             labelWidth: 125,
             maxLength: 100,
             name: 'ortTyp',
@@ -174,7 +174,7 @@
             name: 'nutsCode',
             fieldLabel: i18n.getMsg('orte.nutsCode')
         },{
-            xtype: 'tfield',
+            xtype: 'ortszusatz',
             labelWidth: 125,
             maxLength: 7,
             name: 'ozId',
--- a/app/view/widget/Kta.js	Fri Feb 03 13:18:12 2017 +0100
+++ b/app/view/widget/Kta.js	Fri Feb 03 14:30:16 2017 +0100
@@ -15,10 +15,14 @@
     store: 'Ktas',
     displayField: 'id',
     valueField: 'id',
+    editable: this.editable || false,
+    forceSelection: true,
     // Enable filtering of comboboxes
+    autoSelect: false,
     queryMode: 'local',
     triggerAction: 'all',
     typeAhead: false,
+    minChars: 0,
     tpl: Ext.create("Ext.XTemplate",
         '<tpl for="."><div class="x-combo-list-item  x-boundlist-item" >' +
             '{code} - {bezeichnung}</div></tpl>'),
@@ -33,9 +37,6 @@
         if (!this.store) {
             this.store = Ext.create('Lada.store.Ktas');
         }
-        else {
-            this.store.clearFilter();
-        }
         this.callParent(arguments);
     }
 });
--- a/app/view/widget/OrtTyp.js	Fri Feb 03 13:18:12 2017 +0100
+++ b/app/view/widget/OrtTyp.js	Fri Feb 03 14:30:16 2017 +0100
@@ -15,10 +15,14 @@
     store: 'OrtTyp',
     displayField: 'id',
     valueField: 'id',
+    editable: this.editable || false,
+    forceSelection: true,
     // Enable filtering of comboboxes
+    autoSelect: false,
     queryMode: 'local',
     triggerAction: 'all',
     typeAhead: false,
+    minChars: 0,
     tpl: Ext.create("Ext.XTemplate",
         '<tpl for="."><div class="x-combo-list-item  x-boundlist-item" >' +
             '{code} - {ortTyp}</div></tpl>'),
@@ -33,9 +37,6 @@
         if (!this.store) {
             this.store = Ext.create('Lada.store.OrtTyp');
         }
-        else {
-            this.store.clearFilter();
-        }
         this.callParent(arguments);
     }
 });

http://lada.wald.intevation.org