annotate app/view/widgets/Uwb.js @ 357:94884cd8f8c0

Added logic to upload a file to the server.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 13 Aug 2013 16:21:08 +0200
parents 596501c16560
children cdef828f8049
rev   line source
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
1 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
2 fields: ['umwId', 'umweltBereich'],
260
70a1b5962930 Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
3 sorters: [{
70a1b5962930 Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
4 property: 'umwId',
70a1b5962930 Issue50: Added sorting on the most stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
5 }],
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
6 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
7 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
8 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
9 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
10 },
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 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
12 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
13 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
14 }
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
352
5fbcbf330839 Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 272
diff changeset
18 /**
5fbcbf330839 Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 272
diff changeset
19 * Combobox for Umweltbereich
5fbcbf330839 Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 272
diff changeset
20 */
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 Ext.define('Lada.view.widgets.Uwb' ,{
272
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
22 tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-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
23 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
24 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
25 store: uwbStore,
33
a35119566841 Fetch UWB dynamically.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 31
diff changeset
26 displayField:'umwId',
a35119566841 Fetch UWB dynamically.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 31
diff changeset
27 valueField: 'umwId',
a35119566841 Fetch UWB dynamically.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 31
diff changeset
28 emptyText:'Wählen Sie einen Umweltbereich',
355
596501c16560 Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 352
diff changeset
29 // Enable filtering of comboboxes
596501c16560 Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 352
diff changeset
30 autoSelect: false,
596501c16560 Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 352
diff changeset
31 queryMode: 'local',
596501c16560 Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 352
diff changeset
32 triggerAction : 'all',
596501c16560 Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 352
diff changeset
33 typeAhead: true,
596501c16560 Issue8. Fixed filtering of comboboxes while typing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 352
diff changeset
34 minChars: 0,
272
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
35 // TODO: Set value in disply after selection. Can not figure out why
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
36 // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52>
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
37 //listeners: {
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
38 // select: function(combo, record, index) {
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
39 // console.log("1");
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
40 // console.log(record);
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
41 // console.log("2");
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
42 // var text = record.data['umwId'] + " - " + record.data['umweltBereich'];
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
43 // console.log("3");
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
44 // Ext.form.ComboBox.superclass.setValue.call(this, text);
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
45 // combo.value = record.id;
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
46 // }
852dc338894e Make custom comboboxed selectable
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 261
diff changeset
47 //},
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
48 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
49 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
50 }
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
51 });

http://lada.wald.intevation.org