comparison app/view/grid/Ortszuordnung.js @ 1051:981339d774b8

merged stammdatengrids to default.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 01 Mar 2016 14:12:39 +0100
parents 479782c96efa 1df6b6210b42
children 9a428be3907b
comparison
equal deleted inserted replaced
1048:eacf25f071c0 1051:981339d774b8
9 /** 9 /**
10 * Grid to list Ortszuordnungen 10 * Grid to list Ortszuordnungen
11 */ 11 */
12 Ext.define('Lada.view.grid.Ortszuordnung', { 12 Ext.define('Lada.view.grid.Ortszuordnung', {
13 extend: 'Ext.grid.Panel', 13 extend: 'Ext.grid.Panel',
14 alias: 'widget.ortgrid', 14 alias: 'widget.ortszuordnunggrid',
15 15
16 maxHeight: 350, 16 maxHeight: 350,
17 emptyText: 'Keine Orte gefunden.', 17 emptyText: 'Keine Orte gefunden.',
18 // minHeight and deferEmptyText are needed to be able to show the 18 // minHeight and deferEmptyText are needed to be able to show the
19 // emptyText message. 19 // emptyText message.
45 action: 'delete' 45 action: 'delete'
46 }] 46 }]
47 }]; 47 }];
48 this.columns = [{ 48 this.columns = [{
49 header: 'Typ', 49 header: 'Typ',
50 dataIndex: 'ortsTyp', 50 dataIndex: 'ortszuordnungTyp',
51 width: 50, 51 flex: 1,
52 editor: { 52 editor: {
53 allowBlank: false 53 allowBlank: false
54 } 54 }
55 }, { 55 }, {
56 header: 'Staat', 56 header: 'Staat',
57 dataIndex: 'ort', 57 dataIndex: 'ortId',
58 width: 70, 58 flex: 1,
59 renderer: function(value) { 59 renderer: function(value) {
60 var store = Ext.data.StoreManager.get('orte'); 60 var store = Ext.data.StoreManager.get('orte');
61 var staaten = Ext.data.StoreManager.get('staaten'); 61 var staaten = Ext.data.StoreManager.get('staaten');
62 var record = 62 var record =
63 staaten.getById(store.getById(value).get('staatId')); 63 staaten.getById(store.getById(value).get('staatId'));
64 return record.get('staatIso'); 64 return record.get('staatIso');
65 } 65 }
66 }, { 66 }, {
67 header: 'Gemeineschlüssel', 67 header: 'Gemeindeschlüssel',
68 dataIndex: 'ort', 68 dataIndex: 'ortId',
69 width: 120, 69 flex: 3,
70 renderer: function(value) { 70 renderer: function(value) {
71 var store = Ext.data.StoreManager.get('orte'); 71 var store = Ext.data.StoreManager.get('orte');
72 var record = store.getById(value); 72 var record = store.getById(value);
73 return record.get('gemId'); 73 return record.get('gemId');
74 } 74 }
75 }, { 75 }, {
76 header: 'Gemeindename', 76 header: 'Gemeindename',
77 dataIndex: 'ort', 77 dataIndex: 'ortId',
78 flex: 1, 78 flex: 4,
79 renderer: function(value) { 79 renderer: function(value) {
80 var store = Ext.data.StoreManager.get('orte'); 80 var store = Ext.data.StoreManager.get('orte');
81 var gemeinden = 81 var gemeinden =
82 Ext.data.StoreManager.get('verwaltungseinheiten'); 82 Ext.data.StoreManager.get('verwaltungseinheiten');
83 var record = store.getById(value); 83 var record = store.getById(value);
84 var gemid = record.get('gemId'); 84 var gemid = record.get('gemId');
85 var record2 = gemeinden.getById(gemid); 85 var record2 = gemeinden.getById(gemid);
86 return record2.get('bezeichnung'); 86 return record2.get('bezeichnung');
87 } 87 }
88 }, { 88 }, {
89 header: 'Messpunkt', 89 header: 'Ortszusatztext',
90 dataIndex: 'ort', 90 flex: 6,
91 renderer: function(value) { 91 dataIndex: 'ortszusatztext'
92 var store = Ext.getStore('orte');
93 var record = store.getById(value);
94 return record.get('bezeichnung');
95 }
96 }]; 92 }];
97 this.listeners = { 93 this.listeners = {
98 select: { 94 select: {
99 fn: this.activateRemoveButton, 95 fn: this.activateRemoveButton,
100 scope: this 96 scope: this

http://lada.wald.intevation.org