Mercurial > lada > lada-client
comparison app/view/widget/DatensatzErzeuger.js @ 1107:9bcd17f7a0ae
change some fields in probeform to combobox
author | Michael Stanko <mstanko@bfs.de> |
---|---|
date | Thu, 12 May 2016 16:03:04 +0200 |
parents | |
children | 92c0fa2f29b0 |
comparison
equal
deleted
inserted
replaced
1106:ecce10cf32dc | 1107:9bcd17f7a0ae |
---|---|
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 Umweltbereich | |
11 */ | |
12 Ext.define('Lada.view.widget.DatensatzErzeuger' ,{ | |
13 extend: 'Lada.view.widget.base.ComboBox', | |
14 alias: 'widget.datensatzerzeuger', | |
15 store: 'datensatzerzeuger', | |
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 '{id} - {datensatzErzeuger}</div></tpl>'), | |
29 displayTpl: Ext.create('Ext.XTemplate', | |
30 '<tpl for=".">{id} - {datensatzErzeuger}</tpl>'), | |
31 | |
32 initComponent: function() { | |
33 var i18n = Lada.getApplication().bundle; | |
34 this.emptyText = i18n.getMsg('emptytext.datensatzerzeuger'); | |
35 | |
36 this.store = Ext.data.StoreManager.get('datensatz_erzeuger'); | |
37 if (!this.store) { | |
38 this.store = Ext.create('Lada.store.DatensatzErzeuger'); | |
39 } | |
40 this.store.sort(); | |
41 this.callParent(arguments); | |
42 } | |
43 }); |