annotate app/view/widget/OrtsZusatz.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 d52d4b55914b
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 OrtsZusatz
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.OrtsZusatz' ,{
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.ortszusatz',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 store: 'OrtsZusatz',
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 editable: this.editable || false,
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 forceSelection: true,
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 // Enable filtering of comboboxes
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 autoSelect: false,
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 queryMode: 'local',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 triggerAction: 'all',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 typeAhead: false,
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 minChars: 0,
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 tpl: Ext.create("Ext.XTemplate",
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 '<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
28 '{ozsId} - {ortszusatz}</div></tpl>'),
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 displayTpl: Ext.create('Ext.XTemplate',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 '<tpl for=".">{ozsId} - {ortszusatz}</tpl>'),
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 initComponent: function() {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 var i18n = Lada.getApplication().bundle;
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 this.emptyText = i18n.getMsg('emptytext.ortszusatz');
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 this.store = Ext.data.StoreManager.get('ortszusatz');
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 if (!this.store) {
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 this.store = Ext.create('Lada.store.OrtsZusatz');
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 this.store.sort();
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 this.callParent(arguments);
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 }
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 });

http://lada.wald.intevation.org