annotate app/view/widget/OrtTyp.js @ 1316:f772e70ff723

Added model/store/widget for new stammdaten ort attributes.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 03 Feb 2017 13:16:53 +0100
parents
children 3a3148d50b9c
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 OrtTyp
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.OrtTyp', {
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.orttyp',
f772e70ff723 Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 store: 'OrtTyp',
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 '{code} - {ortTyp}</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=".">{code} - {ortTyp}</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.orttyp');
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('orttyp');
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.OrtTyp');
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