comparison app/view/widgets/Verwaltungseinheit.js @ 497:7c0653e8d9f7

Fixed some js related issues (unused vars, arrays, etc.) and code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 10:38:17 +0100
parents 446e99cfd425
children c1b77fb96b01
comparison
equal deleted inserted replaced
496:d07e5086a64b 497:7c0653e8d9f7
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz 1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH 2 * Software engineering by Intevation GmbH
3 * 3 *
4 * This file is Free Software under the GNU GPL (v>=3) 4 * This file is Free Software under the GNU GPL (v>=3)
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 /** 9 /**
10 * Combobox for Verwaltungseinheit 10 * Combobox for Verwaltungseinheit
11 */ 11 */
12 Ext.define('Lada.view.widgets.Verwaltungseinheit' ,{ 12 Ext.define('Lada.view.widgets.Verwaltungseinheit', {
13 extend: 'Ext.form.field.ComboBox', 13 extend: 'Ext.form.field.ComboBox',
14 require: ['Lada.store.StaVerwaltungseinheiten'], 14 require: ['Lada.store.StaVerwaltungseinheiten'],
15 alias: 'widget.verwaltungseinheiten', 15 alias: 'widget.verwaltungseinheiten',
16 store: 'StaVerwaltungseinheiten', 16 store: 'StaVerwaltungseinheiten',
17 displayField: 'bezeichnung', 17 displayField: 'bezeichnung',
18 valueField: 'id', 18 valueField: 'id',
19 emptyText:'Wählen Sie eine Verwaltungseinheit', 19 emptyText: 'Wählen Sie eine Verwaltungseinheit',
20 hideTrigger: true, 20 hideTrigger: true,
21 // Enable filtering of comboboxes 21 // Enable filtering of comboboxes
22 autoSelect: false, 22 autoSelect: false,
23 queryMode: 'remote', 23 queryMode: 'remote',
24 triggerAction : 'type', 24 triggerAction: 'type',
25 typeAhead: false, 25 typeAhead: false,
26 minChars: 2, 26 minChars: 2,
27 27
28 initComponent: function() { 28 initComponent: function() {
29 this.store = Ext.data.StoreManager.get('StaVerwaltungseinheiten'); 29 this.store = Ext.data.StoreManager.get('StaVerwaltungseinheiten');
34 }, 34 },
35 // This listener is used to load currently "selected" verwaltungseinheit. 35 // This listener is used to load currently "selected" verwaltungseinheit.
36 // This is needed as without having this record the field would only 36 // This is needed as without having this record the field would only
37 // display the raw value (id) of the verwaltungseinheit. 37 // display the raw value (id) of the verwaltungseinheit.
38 listeners: { 38 listeners: {
39 render: function(combo, eOpts) { 39 render: function(combo) {
40 combo.store.load({ 40 combo.store.load({
41 id: this.getValue() 41 id: this.getValue()
42 }); 42 });
43 } 43 }
44 } 44 }

http://lada.wald.intevation.org