Mercurial > lada > lada-client
annotate app/view/widget/Probenintervall.js @ 990:c2a726887dd7
The last status can not be edited anymore. When a new status is added, the new record is preset with ALL previous variables, this includes the StatusStufe! The Date is corrected to the current date. Also the store is sorted by Datum now.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Wed, 16 Dec 2015 09:49:09 +0100 |
parents | b8502964f5c3 |
children |
rev | line source |
---|---|
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
3 * |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
7 */ |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
8 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
9 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
10 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
11 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
12 /** |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
13 * Combobox for Probenintervall |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
14 */ |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
15 Ext.define('Lada.view.widget.Probenintervall', { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
16 extend: 'Lada.view.widget.base.ComboBox', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
17 alias: 'widget.probenintervall', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
18 requires: [ |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
19 'Lada.store.Probenintervall' |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
20 ], |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
21 store: 'Probenintervall', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
22 displayField: 'probenintervall', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
23 valueField: 'probenintervall', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
24 forceSelection: true, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
25 //editable: this.editable || false, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
26 // Enable filtering of comboboxes |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
27 queryMode: 'local', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
28 triggerAction: 'all', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
29 typeAhead: false, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
30 tpl: Ext.create("Ext.XTemplate", |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
31 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
32 '{probenintervall} - {piTexti18nId}</div></tpl>'), |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
33 displayTpl: Ext.create('Ext.XTemplate', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
34 '<tpl for=".">{probenintervall} -'+ |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
35 '{piTexti18nId}</tpl>'), |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
36 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
37 initComponent: function() { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
38 var i18n = Lada.getApplication().bundle; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
39 this.emptyText = i18n.getMsg('emptytext.probenintervall'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
40 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
41 this.store = Ext.data.StoreManager.get('Probenintervall'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
42 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
43 if (!this.store) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
44 this.store = Ext.create('Lada.store.Probenintervall'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
45 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
46 else { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
47 this.store.clearFilter(); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
48 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
49 this.callParent(arguments); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
50 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
51 }); |