Mercurial > lada > lada-client
annotate app/view/widgets/Uwb.js @ 494:f699f6683b16
Fixed typo in pflichtmessgroessen store.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 03 Nov 2014 12:11:06 +0100 |
parents | 850ccfe5f3c4 |
children | d07e5086a64b |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
422
diff
changeset
|
8 |
352
5fbcbf330839
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
272
diff
changeset
|
9 /** |
5fbcbf330839
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
272
diff
changeset
|
10 * Combobox for Umweltbereich |
5fbcbf330839
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
272
diff
changeset
|
11 */ |
31
897e3100c6da
Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.widgets.Uwb' ,{ |
490
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
13 extend: 'Ext.form.ComboBox', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
14 require: ['Lada.store.StaUmwelt'], |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
15 alias: 'widget.uwb', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
16 store: 'StaUmwelt', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
17 displayField:'id', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
18 valueField: 'id', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
19 emptyText:'Wählen Sie einen Umweltbereich', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
20 // Enable filtering of comboboxes |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
21 autoSelect: false, |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
22 queryMode: 'local', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
23 triggerAction : 'all', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
24 typeAhead: false, |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
25 minChars: 0, |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
26 tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >{id} - {umweltBereich}</div></tpl>', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
27 // TODO: Set value in disply after selection. Can not figure out why |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
28 // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52> |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
29 //listeners: { |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
30 // select: function(combo, record, index) { |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
31 // console.log("1"); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
32 // console.log(record); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
33 // console.log("2"); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
34 // var text = record.data['umwId'] + " - " + record.data['umweltBereich']; |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
35 // console.log("3"); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
36 // Ext.form.ComboBox.superclass.setValue.call(this, text); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
37 // combo.value = record.id; |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
38 // } |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
39 //}, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
40 |
31
897e3100c6da
Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
41 initComponent: function() { |
490
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
42 this.store = Ext.data.StoreManager.get('StaUmwelt'); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
43 if (!this.store) { |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
44 this.store = Ext.create('Lada.store.StaUmwelt'); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
481
diff
changeset
|
45 } |
31
897e3100c6da
Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
46 this.callParent(arguments); |
897e3100c6da
Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
47 } |
897e3100c6da
Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
48 }); |