[Lada-commits] [PATCH 1 of 4] Use new combobox widgets as input elements in create ort window

Wald Commits scm-commit at wald.intevation.org
Fri Feb 3 14:32:32 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1486128616 -3600
# Node ID 3a3148d50b9cf15207a47d3f24e6aaae9e8474fa
# Parent  cc90b80508873c6cc2c6533d2c8f023556afbebe
Use new combobox widgets as input elements in create ort window.

diff -r cc90b8050887 -r 3a3148d50b9c app/view/form/Ortserstellung.js
--- 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',
diff -r cc90b8050887 -r 3a3148d50b9c app/view/widget/Kta.js
--- 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);
     }
 });
diff -r cc90b8050887 -r 3a3148d50b9c app/view/widget/OrtTyp.js
--- 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);
     }
 });


More information about the Lada-commits mailing list