changeset 531:7fb335bf6799

Fixed messmethode combobox display value.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 17 Dec 2014 11:34:43 +0100
parents 95bad130be98
children 91a1a88ee353 eef1ff9f2bd2
files app/model/StaMessmethode.js app/view/widgets/Messmethode.js
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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',
--- 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');

http://lada.wald.intevation.org