Mercurial > lada > lada-client
comparison app/view/grid/Ortszuordnung.js @ 1021:1df6b6210b42 stammdatengrids
WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 04 Feb 2016 16:31:46 +0100 |
parents | 2adc329d90fe |
children | 981339d774b8 |
comparison
equal
deleted
inserted
replaced
1014:e9e974d31924 | 1021:1df6b6210b42 |
---|---|
46 }] | 46 }] |
47 }]; | 47 }]; |
48 this.columns = [{ | 48 this.columns = [{ |
49 header: 'Typ', | 49 header: 'Typ', |
50 dataIndex: 'ortszuordnungTyp', | 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: 'ortId', | 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: 'Gemeindeschlüssel', | 67 header: 'Gemeindeschlüssel', |
68 dataIndex: 'ortId', | 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: 'ortId', | 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); |
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: 'Ortszusatztext', | 89 header: 'Ortszusatztext', |
90 flex: 6, | |
90 dataIndex: 'ortszusatztext' | 91 dataIndex: 'ortszusatztext' |
91 }]; | 92 }]; |
92 this.listeners = { | 93 this.listeners = { |
93 select: { | 94 select: { |
94 fn: this.activateRemoveButton, | 95 fn: this.activateRemoveButton, |