Mercurial > lada > lada-client
annotate app/view/widget/Kta.js @ 1321:f1e348109ebb
Updated style to fit the other windows style.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 03 Feb 2017 14:31:10 +0100 |
parents | 3a3148d50b9c |
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 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.Kta', { |
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.kta', |
f772e70ff723
Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 store: 'Ktas', |
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', |
1320
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1316
diff
changeset
|
18 editable: this.editable || false, |
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1316
diff
changeset
|
19 forceSelection: true, |
1316
f772e70ff723
Added model/store/widget for new stammdaten ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 // Enable filtering of comboboxes |
1320
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1316
diff
changeset
|
21 autoSelect: false, |
1316
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, |
1320
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1316
diff
changeset
|
25 minChars: 0, |
1316
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 '{code} - {bezeichnung}</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=".">{code} - {bezeichnung}</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.kta'); |
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('ktas'); |
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.Ktas'); |
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.callParent(arguments); |
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 }); |