comparison app/view/widget/Status.js @ 1159:85acec6c6e6a

Use equal fieldnames as in model for StatusWerte. This will enable us to use a model based store here too.
author Tom Gottfried <tom@intevation.de>
date Wed, 08 Jun 2016 12:37:53 +0200
parents 6866be10e40c
children 38599f18c863
comparison
equal deleted inserted replaced
1158:846dcd217be3 1159:85acec6c6e6a
5 * and comes with ABSOLUTELY NO WARRANTY! Check out 5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details. 6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */ 7 */
8 8
9 var statuswerteStore = Ext.create('Ext.data.Store', { 9 var statuswerteStore = Ext.create('Ext.data.Store', {
10 fields: ['id', 'status'], 10 fields: ['id', 'wert'],
11 data: [{ 11 data: [{
12 'id': 1, 12 'id': 1,
13 'status': 'plausibel' 13 'wert': 'plausibel'
14 }, { 14 }, {
15 'id': 2, 15 'id': 2,
16 'status': 'nicht repräsentativ' 16 'wert': 'nicht repräsentativ'
17 }, { 17 }, {
18 'id': 3, 18 'id': 3,
19 'status': 'nicht plausibel' 19 'wert': 'nicht plausibel'
20 }, { 20 }, {
21 'id': 4, 21 'id': 4,
22 'status': 'Rückfrage' 22 'wert': 'Rückfrage'
23 }, { 23 }, {
24 'id': 7, 24 'id': 7,
25 'status': 'nicht lieferbar' 25 'wert': 'nicht lieferbar'
26 }, { 26 }, {
27 'id': 8, 27 'id': 8,
28 'status': 'zurücksetzen' 28 'wert': 'zurücksetzen'
29 }] 29 }]
30 }); 30 });
31 31
32 /** 32 /**
33 * Combobox for Statuswert 33 * Combobox for Statuswert
34 */ 34 */
35 Ext.define('Lada.view.widget.Status', { 35 Ext.define('Lada.view.widget.Status', {
36 extend: 'Lada.view.widget.base.ComboBox', 36 extend: 'Lada.view.widget.base.ComboBox',
37 alias: 'widget.statuswert', 37 alias: 'widget.statuswert',
38 store: statuswerteStore, 38 store: statuswerteStore,
39 displayField: 'status', 39 displayField: 'wert',
40 valueField: 'id', 40 valueField: 'id',
41 emptyText: 'Wählen Sie einen Status', 41 emptyText: 'Wählen Sie einen Status',
42 // Enable filtering of comboboxes 42 // Enable filtering of comboboxes
43 autoSelect: false, 43 autoSelect: false,
44 queryMode: 'local', 44 queryMode: 'local',

http://lada.wald.intevation.org