[Lada-commits] [PATCH 3 of 3] Fixed messmethode combobox display value

Wald Commits scm-commit at wald.intevation.org
Wed Dec 17 11:34:04 CET 2014


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1418812483 -3600
# Node ID 7fb335bf6799cb2711de87bc8823914467a67814
# Parent  95bad130be9837f2ca560269b30a8c1c22fb93de
Fixed messmethode combobox display value.

diff -r 95bad130be98 -r 7fb335bf6799 app/model/StaMessmethode.js
--- a/app/model/StaMessmethode.js	Wed Dec 17 11:31:47 2014 +0100
+++ b/app/model/StaMessmethode.js	Wed Dec 17 11:34:43 2014 +0100
@@ -24,6 +24,13 @@
         name: 'beschreibung'
     }, {
         name: 'messmethode'
+    }, {
+        name: 'display',
+        persist: false,
+        convert: function(value, record) {
+            return record.get('id') + ' - ' + record.get('messmethode');
+        }
+
     }],
 
     idProperty: 'id',
diff -r 95bad130be98 -r 7fb335bf6799 app/view/widgets/Messmethode.js
--- a/app/view/widgets/Messmethode.js	Wed Dec 17 11:31:47 2014 +0100
+++ b/app/view/widgets/Messmethode.js	Wed Dec 17 11:34:43 2014 +0100
@@ -13,17 +13,15 @@
     extend: 'Ext.form.ComboBox',
     alias: 'widget.messmethode',
     store: 'StaMessmethoden',
-    displayField: 'messmethode',
+    displayField: 'display',
     valueField: 'id',
     emptyText: 'Wählen Sie eine Messmethode',
     // Enable filtering of comboboxes
     autoSelect: false,
     queryMode: 'local',
     triggerAction: 'all',
-    typeAhead: false,
+    typeAhead: true,
     minChars: 0,
-    tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' +
-        '{id} - {messmethode}</div></tpl>',
 
     initComponent: function() {
         this.store = Ext.data.StoreManager.get('staMessmethoden');


More information about the Lada-commits mailing list