annotate app/view/widget/KoordinatenArt.js @ 1364:b58868c47f02

reintroduced filtered display of Stammdaten panel
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 08 Feb 2017 12:53:24 +0100
parents d52d4b55914b
children
rev   line source
1316
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 /**
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Combobox for Datenbasis
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.widget.KoordinatenArt', {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Lada.view.widget.base.ComboBox',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.koordinatenart',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 store: 'KoordinatenArt',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 displayField: 'id',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 valueField: 'id',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 // Enable filtering of comboboxes
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 queryMode: 'local',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 triggerAction: 'all',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 typeAhead: false,
1363
d52d4b55914b Allow re-selection of referenced items in Ortserstellung.
Tom Gottfried <tom@intevation.de>
parents: 1353
diff changeset
22 editable: this.editable || false,
d52d4b55914b Allow re-selection of referenced items in Ortserstellung.
Tom Gottfried <tom@intevation.de>
parents: 1353
diff changeset
23 disableKeyFilter: true,
1353
39dbdfa00c91 Do not allow arbitrary input for Koordinatenart.
Tom Gottfried <tom@intevation.de>
parents: 1316
diff changeset
24 forceSelection: true,
1316
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 tpl: Ext.create("Ext.XTemplate",
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' +
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 '{idfGeoKey} - {koordinatenart}</div></tpl>'),
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 displayTpl: Ext.create('Ext.XTemplate',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 '<tpl for=".">{idfGeoKey} - {koordinatenart}</tpl>'),
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 initComponent: function() {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 var i18n = Lada.getApplication().bundle;
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 this.emptyText = i18n.getMsg('emptytext.koordinatenart');
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 this.store = Ext.data.StoreManager.get('koordinatenart');
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 if (!this.store) {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 this.store = Ext.create('Lada.store.KoordinatenArt');
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 else {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 this.store.clearFilter();
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 this.callParent(arguments);
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 });

http://lada.wald.intevation.org