comparison app/view/grid/Probenehmer.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('pn.gridTitle') 48 text: i18n.getMsg('pn.gridTitle')
49 },
50 '->',
51 {
52 text: i18n.getMsg('pn.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('pn.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 this.columns = [{ 63 this.columns = [{
52 header: i18n.getMsg('netzbetreiberId'), 64 header: i18n.getMsg('netzbetreiberId'),
53 dataIndex: 'netzbetreiberId', 65 dataIndex: 'netzbetreiberId',
84 } 96 }
85 }, { 97 }, {
86 header: i18n.getMsg('bemerkung'), 98 header: i18n.getMsg('bemerkung'),
87 dataIndex: 'bemerkung', 99 dataIndex: 'bemerkung',
88 editor: { 100 editor: {
89 allowBlank: false 101 allowBlank: false,
102 xtype: 'textfield'
90 } 103 }
91 }, { 104 }, {
92 header: i18n.getMsg('kurzBezeichnung'), 105 header: i18n.getMsg('kurzBezeichnung'),
93 dataIndex: 'kurzBezeichnung', 106 dataIndex: 'kurzBezeichnung',
94 editor: { 107 editor: {
95 allowBlank: false 108 allowBlank: false,
109 xtype: 'textfield'
96 } 110 }
97 }, { 111 }, {
98 header: i18n.getMsg('ort'), 112 header: i18n.getMsg('ort'),
99 dataIndex: 'ort', 113 dataIndex: 'ort',
100 editor: { 114 editor: {
101 allowBlank: false 115 allowBlank: false,
116 xtype: 'textfield'
102 } 117 }
103 }, { 118 }, {
104 header: i18n.getMsg('plz'), 119 header: i18n.getMsg('plz'),
105 dataIndex: 'plz', 120 dataIndex: 'plz',
106 editor: { 121 editor: {
107 allowBlank: false 122 allowBlank: false,
123 xtype: 'numberfield'
108 } 124 }
109 }, { 125 }, {
110 header: i18n.getMsg('strasse'), 126 header: i18n.getMsg('strasse'),
111 dataIndex: 'strasse', 127 dataIndex: 'strasse',
112 editor: { 128 editor: {
113 allowBlank: false 129 allowBlank: false,
130 xtype: 'textfield'
114 } 131 }
115 }, { 132 }, {
116 header: i18n.getMsg('telefon'), 133 header: i18n.getMsg('telefon'),
117 dataIndex: 'telefon', 134 dataIndex: 'telefon',
118 editor: { 135 editor: {
151 * This sets the Store of this Grid 168 * This sets the Store of this Grid
152 */ 169 */
153 setStore: function(store){ 170 setStore: function(store){
154 var i18n = Lada.getApplication().bundle; 171 var i18n = Lada.getApplication().bundle;
155 172
156 this.removeDocked(Ext.getCmp('ptbar'), true); 173 if (store) {
157 this.reconfigure(store); 174 this.removeDocked(Ext.getCmp('ptbar'), true);
158 this.addDocked([{ 175 this.reconfigure(store);
159 xtype: 'pagingtoolbar', 176 this.down('button[action=add]').enable();
160 id: 'ptbar', 177 this.addDocked([{
161 dock: 'bottom', 178 xtype: 'pagingtoolbar',
162 store: store, 179 id: 'ptbar',
163 displayInfo: true 180 dock: 'bottom',
164 }]); 181 store: store,
182 displayInfo: true
183 }]);
184 }
165 } 185 }
166 }); 186 });
167 187

http://lada.wald.intevation.org