Mercurial > lada > lada-client
annotate app/view/widgets/Verwaltungseinheit.js @ 481:e45f4df57938
Set typeAhead to false. Causes errors.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 21 Jan 2014 17:04:19 +0100 |
parents | debfcc7713e3 |
children | 446e99cfd425 |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
428
diff
changeset
|
8 |
352
5fbcbf330839
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
153
diff
changeset
|
9 /** |
5fbcbf330839
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
153
diff
changeset
|
10 * Combobox for Verwaltungseinheit |
5fbcbf330839
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
153
diff
changeset
|
11 */ |
153
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.widgets.Verwaltungseinheit' ,{ |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 extend: 'Ext.form.ComboBox', |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
14 alias: 'widget.verwaltungseinheiten', |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 store: 'Verwaltungseinheiten', |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 displayField: 'bezeichnung', |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 valueField: 'gemId', |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 emptyText:'Wählen Sie eine Verwaltungseinheit', |
417
a4eb98a6ea20
Disabled trigger for combobox and request data if two chars typed.
Raimund Renkert <rrenkert@intevation.de>
parents:
416
diff
changeset
|
19 hideTrigger: true, |
355
596501c16560
Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
352
diff
changeset
|
20 // Enable filtering of comboboxes |
596501c16560
Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
352
diff
changeset
|
21 autoSelect: false, |
416
0814c50caa81
Set querymode to remote to only load a subset of items of the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
355
diff
changeset
|
22 queryMode: 'remote', |
417
a4eb98a6ea20
Disabled trigger for combobox and request data if two chars typed.
Raimund Renkert <rrenkert@intevation.de>
parents:
416
diff
changeset
|
23 triggerAction : 'type', |
481
e45f4df57938
Set typeAhead to false. Causes errors.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
472
diff
changeset
|
24 typeAhead: false, |
417
a4eb98a6ea20
Disabled trigger for combobox and request data if two chars typed.
Raimund Renkert <rrenkert@intevation.de>
parents:
416
diff
changeset
|
25 minChars: 2, |
153
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 initComponent: function() { |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 this.callParent(arguments); |
428
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
28 }, |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
29 // This listener is used to load currently "selected" verwaltungseinheit. |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
30 // This is needed as without having this record the field would only |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
31 // display the raw value (id) of the verwaltungseinheit. |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
32 listeners: { |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
33 render: function(combo, eOpts) { |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
34 combo.store.load({ |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
35 id: this.getValue() |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
36 }); |
651ee49ff3c2
Added listener to load the recored of the set Verwaltungseinheit.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
417
diff
changeset
|
37 } |
153
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 } |
e9fb4814153a
Added files for Staat, Ort and Verwaltungseinheiten.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
39 }); |