Mercurial > lada > lada-client
comparison app/view/widget/OrtTyp.js @ 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 | f772e70ff723 |
children | d52d4b55914b |
comparison
equal
deleted
inserted
replaced
1318:cc90b8050887 | 1320:3a3148d50b9c |
---|---|
13 extend: 'Lada.view.widget.base.ComboBox', | 13 extend: 'Lada.view.widget.base.ComboBox', |
14 alias: 'widget.orttyp', | 14 alias: 'widget.orttyp', |
15 store: 'OrtTyp', | 15 store: 'OrtTyp', |
16 displayField: 'id', | 16 displayField: 'id', |
17 valueField: 'id', | 17 valueField: 'id', |
18 editable: this.editable || false, | |
19 forceSelection: true, | |
18 // Enable filtering of comboboxes | 20 // Enable filtering of comboboxes |
21 autoSelect: false, | |
19 queryMode: 'local', | 22 queryMode: 'local', |
20 triggerAction: 'all', | 23 triggerAction: 'all', |
21 typeAhead: false, | 24 typeAhead: false, |
25 minChars: 0, | |
22 tpl: Ext.create("Ext.XTemplate", | 26 tpl: Ext.create("Ext.XTemplate", |
23 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + | 27 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + |
24 '{code} - {ortTyp}</div></tpl>'), | 28 '{code} - {ortTyp}</div></tpl>'), |
25 displayTpl: Ext.create('Ext.XTemplate', | 29 displayTpl: Ext.create('Ext.XTemplate', |
26 '<tpl for=".">{code} - {ortTyp}</tpl>'), | 30 '<tpl for=".">{code} - {ortTyp}</tpl>'), |
31 | 35 |
32 this.store = Ext.data.StoreManager.get('orttyp'); | 36 this.store = Ext.data.StoreManager.get('orttyp'); |
33 if (!this.store) { | 37 if (!this.store) { |
34 this.store = Ext.create('Lada.store.OrtTyp'); | 38 this.store = Ext.create('Lada.store.OrtTyp'); |
35 } | 39 } |
36 else { | |
37 this.store.clearFilter(); | |
38 } | |
39 this.callParent(arguments); | 40 this.callParent(arguments); |
40 } | 41 } |
41 }); | 42 }); |