Mercurial > lada > lada-client
comparison app/view/orte/List.js @ 149:26ac4c99f8c4
Added Orte.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Mon, 01 Jul 2013 17:05:03 +0200 |
parents | 7ad96e3d70c1 |
children | a80e84c934a4 |
comparison
equal
deleted
inserted
replaced
148:ed7fb4fa32dc | 149:26ac4c99f8c4 |
---|---|
8 // minHeight and deferEmptyText are needed to be able to show the | 8 // minHeight and deferEmptyText are needed to be able to show the |
9 // emptyText message. | 9 // emptyText message. |
10 minHeight: 35, | 10 minHeight: 35, |
11 deferEmptyText: false | 11 deferEmptyText: false |
12 }, | 12 }, |
13 probeId: null, | |
13 initComponent: function() { | 14 initComponent: function() { |
14 this.dockedItems = [ | 15 this.dockedItems = [ |
15 { | 16 { |
16 xtype: 'toolbar', | 17 xtype: 'toolbar', |
17 dock: 'top', | 18 dock: 'top', |
18 items: [ | 19 items: [ |
19 { | 20 { |
20 text: 'Hinzufügen', | 21 text: 'Hinzufügen', |
21 icon: 'gfx/plus.gif', | 22 icon: 'gfx/plus.gif', |
22 action: 'add' | 23 action: 'add', |
24 probeId: this.probeId | |
23 }, | 25 }, |
24 { | 26 { |
25 text: 'Löschen', | 27 text: 'Löschen', |
26 icon: 'gfx/minus.gif', | 28 icon: 'gfx/minus.gif', |
27 action: 'delete' | 29 action: 'delete' |
28 } | 30 } |
29 ] | 31 ] |
30 } | 32 } |
31 ]; | 33 ]; |
32 this.columns = [ | 34 this.columns = [ |
33 {header: 'Typ', dataIndex: 'otyp'}, | 35 { |
34 {header: 'ID', dataIndex: 'ortId'}, | 36 header: 'Typ', |
35 {header: 'Staat', dataIndex: 'staatId'}, | 37 dataIndex: 'ortsTyp' |
36 {header: 'Gem-ID', dataIndex: 'gemId'}, | 38 }, |
37 {header: 'Gemeindebezeichnung', dataIndex: 'bezeichnung', flex: 1}, | 39 { |
38 {header: 'Messpunkt', dataIndex: ''} | 40 header: 'Staat', |
41 dataIndex: 'ortId', | |
42 renderer: function(value) { | |
43 var store = Ext.getStore('Ortedetails'); | |
44 var staaten = Ext.getStore('Staaten'); | |
45 var record = staaten.getById(store.getById(value).get('staatId')); | |
46 return record.get('staatIso'); | |
47 } | |
48 | |
49 }, | |
50 { | |
51 header: 'Gem-ID', | |
52 dataIndex: 'ortId', | |
53 renderer: function(value) { | |
54 var store = Ext.getStore('Ortedetails'); | |
55 var record = store.getById(value); | |
56 return record.get('gemId'); | |
57 } | |
58 | |
59 }, | |
60 { | |
61 header: 'Gemeindebezeichnung', | |
62 dataIndex: 'ortId', | |
63 flex: 1, | |
64 renderer: function(value) { | |
65 var store = Ext.getStore('Ortedetails'); | |
66 var record = store.getById(value); | |
67 return record.get('beschreibung'); | |
68 } | |
69 | |
70 }, | |
71 { | |
72 header: 'Messpunkt', | |
73 dataIndex: 'ortId', | |
74 renderer: function(value) { | |
75 return "???"; | |
76 } | |
77 | |
78 } | |
39 ]; | 79 ]; |
40 this.callParent(arguments); | 80 this.callParent(arguments); |
41 } | 81 } |
42 }); | 82 }); |
43 | 83 |