annotate app/view/widget/Probenehmer.js @ 1127:5941ee0c7247

Do not constrain range of values. Zero and (e.g. for temperature) even negative values have to be possible. As numbers with exponent >99 are unlikely, they are displayed as they are.
author Tom Gottfried <tom@intevation.de>
date Tue, 24 May 2016 15:20:01 +0200
parents 92c0fa2f29b0
children 9c8b5cbb929a
rev   line source
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
3 *
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
7 */
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
8
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
9 /**
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
10 * Combobox for Umweltbereich
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
11 */
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
12 Ext.define('Lada.view.widget.Probenehmer' ,{
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
13 extend: 'Lada.view.widget.base.ComboBox',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
14 alias: 'widget.probenehmer',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
15 store: 'Probenehmer',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
16 displayField: 'id',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
17 valueField: 'id',
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1107
diff changeset
18 emptyText: 'Wählen Sie einen Probenehmer',
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
19 editable: this.editable || false,
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
20 forceSelection: true,
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
21 // Enable filtering of comboboxes
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
22 autoSelect: false,
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
23 queryMode: 'local',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
24 triggerAction: 'all',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
25 typeAhead: false,
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
26 minChars: 0,
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
27 tpl: Ext.create("Ext.XTemplate",
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
28 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' +
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1107
diff changeset
29 '{prnId} - {kurzBezeichnung}</div></tpl>'),
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
30 displayTpl: Ext.create('Ext.XTemplate',
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1107
diff changeset
31 '<tpl for=".">{kurzBezeichnung}</tpl>'),
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
32
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
33 initComponent: function() {
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
34 var i18n = Lada.getApplication().bundle;
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
35 this.emptyText = i18n.getMsg('emptytext.probenehmer');
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
36
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
37 this.store = Ext.data.StoreManager.get('probenehmer');
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
38 if (!this.store) {
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
39 this.store = Ext.create('Lada.store.Probenehmer');
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
40 }
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
41 this.store.sort();
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
42 this.callParent(arguments);
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
43 }
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents:
diff changeset
44 });

http://lada.wald.intevation.org