annotate app/view/widget/KoordinatenArt.js @ 1327:c413ec1aaa2e

reload ort store for grid using netzbetreiber as filter param.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 03 Feb 2017 15:26:41 +0100
parents f772e70ff723
children 39dbdfa00c91
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,
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 tpl: Ext.create("Ext.XTemplate",
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 '<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
24 '{idfGeoKey} - {koordinatenart}</div></tpl>'),
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 displayTpl: 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=".">{idfGeoKey} - {koordinatenart}</tpl>'),
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 initComponent: function() {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 var i18n = Lada.getApplication().bundle;
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 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
31
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 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
33 if (!this.store) {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 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
35 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 else {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 this.store.clearFilter();
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 this.callParent(arguments);
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 });

http://lada.wald.intevation.org