annotate app/view/widgets/Uwb.js @ 261:1375ff0f248d

Issue50. Show ID an text in combobox.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 26 Jul 2013 10:12:58 +0200
parents 70a1b5962930
children 852dc338894e
rev   line source
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 // Combobox for Umweltbereich
120
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
2 var uwbStore = Ext.create('Ext.data.Store', {
261
1375ff0f248d Issue50. Show ID an text in combobox.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 260
diff changeset
3 fields: ['umwId', 'umweltBereich'],
260
70a1b5962930 Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
4 sorters: [{
70a1b5962930 Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
5 property: 'umwId',
70a1b5962930 Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
6 }],
120
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
7 proxy: {
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
8 type: 'ajax',
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
9 api: {
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
10 read: 'server/rest/uwb'
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
11 },
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
12 reader: {
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
13 type: 'json',
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
14 root: 'data'
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
15 }
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
16 }
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
17 });
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
18
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 Ext.define('Lada.view.widgets.Uwb' ,{
261
1375ff0f248d Issue50. Show ID an text in combobox.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 260
diff changeset
20 tpl: '<tpl for="."><div class="x-combo-list-item" >{umwId} - {umweltBereich}</div></tpl>',
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 extend: 'Ext.form.ComboBox',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 alias: 'widget.uwb',
120
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 33
diff changeset
23 store: uwbStore,
33
a35119566841 Fetch UWB dynamically.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 31
diff changeset
24 displayField:'umwId',
a35119566841 Fetch UWB dynamically.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 31
diff changeset
25 valueField: 'umwId',
a35119566841 Fetch UWB dynamically.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 31
diff changeset
26 emptyText:'Wählen Sie einen Umweltbereich',
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 initComponent: function() {
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 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
29 }
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 });

http://lada.wald.intevation.org