Mercurial > lada > lada-client
comparison app/view/widget/Umwelt.js @ 548:d47ee7439f44
Added new js files.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 06 Mar 2015 12:43:52 +0100 |
parents | |
children | 7f11b75e0188 |
comparison
equal
deleted
inserted
replaced
547:f172b35a3b92 | 548:d47ee7439f44 |
---|---|
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.Umwelt' ,{ | |
13 extend: 'Lada.view.widget.base.ComboBox', | |
14 alias: 'widget.umwelt', | |
15 store: 'Umwelt', | |
16 displayField: 'id', | |
17 valueField: 'id', | |
18 emptyText: 'Wählen Sie einen Umweltbereich', | |
19 // Enable filtering of comboboxes | |
20 autoSelect: false, | |
21 queryMode: 'local', | |
22 triggerAction: 'all', | |
23 typeAhead: false, | |
24 minChars: 0, | |
25 tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + | |
26 '{id} - {umweltBereich}</div></tpl>', | |
27 // TODO: Set value in disply after selection. Can not figure out why | |
28 // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52> | |
29 // listeners: { | |
30 // select: function(combo, record, index) { | |
31 // console.log("1"); | |
32 // console.log(record); | |
33 // console.log("2"); | |
34 // var text = record.data['umwId'] + | |
35 // " - " + record.data['umweltBereich']; | |
36 // console.log("3"); | |
37 // Ext.form.ComboBox.superclass.setValue.call(this, text); | |
38 // combo.value = record.id; | |
39 // } | |
40 // }, | |
41 | |
42 initComponent: function() { | |
43 this.store = Ext.data.StoreManager.get('umwelt'); | |
44 if (!this.store) { | |
45 this.store = Ext.create('Lada.store.Umwelt'); | |
46 } | |
47 this.callParent(arguments); | |
48 } | |
49 }); |