Mercurial > lada > lada-client
comparison app/view/grid/DatensatzErzeuger.js @ 984:b21421ba6917 stammdatengrids
added buttons for datensatzerzeuger, pobenehmer, added controllers
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 10 Dec 2015 08:30:14 +0100 |
parents | d8b0b23047b1 |
children | 6afdbc8ee920 77e22ad5cc84 |
comparison
equal
deleted
inserted
replaced
983:0a5fe163f1c8 | 984:b21421ba6917 |
---|---|
44 dock: 'top', | 44 dock: 'top', |
45 items: [{ | 45 items: [{ |
46 xtype: 'tbtext', | 46 xtype: 'tbtext', |
47 id: 'tbtitle', | 47 id: 'tbtitle', |
48 text: i18n.getMsg('de.gridTitle') | 48 text: i18n.getMsg('de.gridTitle') |
49 }, | |
50 '->', | |
51 { | |
52 text: i18n.getMsg('de.button.add'), | |
53 icon: 'resources/img/list-add.png', | |
54 action: 'add', | |
55 disabled: true // disabled on startup, will be enabled by setStore | |
56 }, { | |
57 text: i18n.getMsg('de.button.delete'), | |
58 icon: 'resources/img/list-remove.png', | |
59 action: 'delete', | |
60 disabled: true // disabled on startup, will be enabled by controller if necessary | |
49 }] | 61 }] |
50 }]; | 62 }]; |
51 | 63 |
52 this.columns = [{ | 64 this.columns = [{ |
53 header: i18n.getMsg('netzbetreiberId'), | 65 header: i18n.getMsg('netzbetreiberId'), |
79 } | 91 } |
80 }, { | 92 }, { |
81 header: i18n.getMsg('bezeichnung'), | 93 header: i18n.getMsg('bezeichnung'), |
82 dataIndex: 'bezeichnung', | 94 dataIndex: 'bezeichnung', |
83 editor: { | 95 editor: { |
96 allowBlank: false, | |
84 xtype: 'textfield' | 97 xtype: 'textfield' |
85 } | 98 } |
86 }, { | 99 }, { |
87 header: i18n.getMsg('mstId'), | 100 header: i18n.getMsg('mstId'), |
88 dataIndex: 'mstId', | 101 dataIndex: 'mstId', |
98 } | 111 } |
99 return r; | 112 return r; |
100 }, | 113 }, |
101 editor: { | 114 editor: { |
102 xtype: 'combobox', | 115 xtype: 'combobox', |
103 store: Ext.data.StoreManager.get('messstellenFiltered'), | 116 store: Ext.data.StoreManager.get('messstellen'), |
104 displayField: 'messStelle', | 117 displayField: 'messStelle', |
105 valueField: 'id', | 118 valueField: 'id', |
106 allowBlank: false | 119 allowBlank: false |
107 } | 120 } |
108 }, { | 121 }, { |
126 * This sets the Store of this Grid | 139 * This sets the Store of this Grid |
127 */ | 140 */ |
128 setStore: function(store){ | 141 setStore: function(store){ |
129 var i18n = Lada.getApplication().bundle; | 142 var i18n = Lada.getApplication().bundle; |
130 | 143 |
131 this.removeDocked(Ext.getCmp('ptbar'), true); | 144 if (store) { |
132 this.reconfigure(store); | 145 this.removeDocked(Ext.getCmp('ptbar'), true); |
133 this.addDocked([{ | 146 this.reconfigure(store); |
134 xtype: 'pagingtoolbar', | 147 this.down('button[action=add]').enable(); |
135 id: 'ptbar', | 148 this.addDocked([{ |
136 dock: 'bottom', | 149 xtype: 'pagingtoolbar', |
137 store: store, | 150 id: 'ptbar', |
138 displayInfo: true | 151 dock: 'bottom', |
139 }]); | 152 store: store, |
153 displayInfo: true | |
154 }]); | |
155 } | |
140 } | 156 } |
141 }); | 157 }); |