Mercurial > lada > lada-client
comparison app/view/widget/OrtsZusatz.js @ 1316:f772e70ff723
Added model/store/widget for new stammdaten ort attributes.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 03 Feb 2017 13:16:53 +0100 |
parents | |
children | d52d4b55914b |
comparison
equal
deleted
inserted
replaced
1315:d312e514875c | 1316:f772e70ff723 |
---|---|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out | |
6 * the documentation coming with IMIS-Labordaten-Application for details. | |
7 */ | |
8 | |
9 /** | |
10 * Combobox for OrtsZusatz | |
11 */ | |
12 Ext.define('Lada.view.widget.OrtsZusatz' ,{ | |
13 extend: 'Lada.view.widget.base.ComboBox', | |
14 alias: 'widget.ortszusatz', | |
15 store: 'OrtsZusatz', | |
16 displayField: 'id', | |
17 valueField: 'id', | |
18 editable: this.editable || false, | |
19 forceSelection: true, | |
20 // Enable filtering of comboboxes | |
21 autoSelect: false, | |
22 queryMode: 'local', | |
23 triggerAction: 'all', | |
24 typeAhead: false, | |
25 minChars: 0, | |
26 tpl: Ext.create("Ext.XTemplate", | |
27 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + | |
28 '{ozsId} - {ortszusatz}</div></tpl>'), | |
29 displayTpl: Ext.create('Ext.XTemplate', | |
30 '<tpl for=".">{ozsId} - {ortszusatz}</tpl>'), | |
31 | |
32 initComponent: function() { | |
33 var i18n = Lada.getApplication().bundle; | |
34 this.emptyText = i18n.getMsg('emptytext.ortszusatz'); | |
35 | |
36 this.store = Ext.data.StoreManager.get('ortszusatz'); | |
37 if (!this.store) { | |
38 this.store = Ext.create('Lada.store.OrtsZusatz'); | |
39 } | |
40 this.store.sort(); | |
41 this.callParent(arguments); | |
42 } | |
43 }); |