Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/orte/List.js Mon Jul 01 14:20:08 2013 +0200 +++ b/app/view/orte/List.js Mon Jul 01 17:05:03 2013 +0200 @@ -10,6 +10,7 @@ minHeight: 35, deferEmptyText: false }, + probeId: null, initComponent: function() { this.dockedItems = [ { @@ -19,7 +20,8 @@ { text: 'Hinzufügen', icon: 'gfx/plus.gif', - action: 'add' + action: 'add', + probeId: this.probeId }, { text: 'Löschen', @@ -30,12 +32,50 @@ } ]; this.columns = [ - {header: 'Typ', dataIndex: 'otyp'}, - {header: 'ID', dataIndex: 'ortId'}, - {header: 'Staat', dataIndex: 'staatId'}, - {header: 'Gem-ID', dataIndex: 'gemId'}, - {header: 'Gemeindebezeichnung', dataIndex: 'bezeichnung', flex: 1}, - {header: 'Messpunkt', dataIndex: ''} + { + header: 'Typ', + dataIndex: 'ortsTyp' + }, + { + header: 'Staat', + dataIndex: 'ortId', + renderer: function(value) { + var store = Ext.getStore('Ortedetails'); + var staaten = Ext.getStore('Staaten'); + var record = staaten.getById(store.getById(value).get('staatId')); + return record.get('staatIso'); + } + + }, + { + header: 'Gem-ID', + dataIndex: 'ortId', + renderer: function(value) { + var store = Ext.getStore('Ortedetails'); + var record = store.getById(value); + return record.get('gemId'); + } + + }, + { + header: 'Gemeindebezeichnung', + dataIndex: 'ortId', + flex: 1, + renderer: function(value) { + var store = Ext.getStore('Ortedetails'); + var record = store.getById(value); + return record.get('beschreibung'); + } + + }, + { + header: 'Messpunkt', + dataIndex: 'ortId', + renderer: function(value) { + return "???"; + } + + } ]; this.callParent(arguments); }