comparison app/view/grid/MessprogrammKategorie.js @ 1014:e9e974d31924 stammdatengrids

Set mandatory fields
author Dustin Demuth <dustin@intevation.de>
date Fri, 29 Jan 2016 14:51:17 +0100
parents 6afdbc8ee920
children 981339d774b8
comparison
equal deleted inserted replaced
1013:75ce503ab296 1014:e9e974d31924
42 this.dockedItems = [{ 42 this.dockedItems = [{
43 xtype: 'toolbar', 43 xtype: 'toolbar',
44 dock: 'top', 44 dock: 'top',
45 items: [{ 45 items: [{
46 xtype: 'tbtext', 46 xtype: 'tbtext',
47 id: 'tbtitle',
48 text: i18n.getMsg('mk.gridTitle') 47 text: i18n.getMsg('mk.gridTitle')
49 }, 48 },
50 '->', 49 '->',
51 { 50 {
52 text: i18n.getMsg('mk.button.add'), 51 text: i18n.getMsg('mk.button.add'),
85 } 84 }
86 }, { 85 }, {
87 header: i18n.getMsg('mplId'), 86 header: i18n.getMsg('mplId'),
88 dataIndex: 'mplId', 87 dataIndex: 'mplId',
89 editor: { 88 editor: {
89 xtype: 'textfield',
90 allowBlank: false 90 allowBlank: false
91 } 91 }
92 }, { 92 }, {
93 header: i18n.getMsg('bezeichnung'), 93 header: i18n.getMsg('bezeichnung'),
94 dataIndex: 'bezeichnung', 94 dataIndex: 'bezeichnung',
95 editor: { 95 editor: {
96 xtype: 'textfield',
96 allowBlank: false 97 allowBlank: false
97 } 98 }
98 }, { 99 }, {
99 header: i18n.getMsg('letzteAenderung'), 100 header: i18n.getMsg('letzteAenderung'),
100 dataIndex: 'letzteAenderung' 101 dataIndex: 'letzteAenderung'
106 * This sets the Store of this Grid 107 * This sets the Store of this Grid
107 */ 108 */
108 setStore: function(store){ 109 setStore: function(store){
109 var i18n = Lada.getApplication().bundle; 110 var i18n = Lada.getApplication().bundle;
110 111
111 this.removeDocked(Ext.getCmp('ptbar'), true); 112 if (store) {
112 this.reconfigure(store); 113 this.reconfigure(store);
113 this.down('button[action=add]').enable(); 114
114 this.addDocked([{ 115 var ptbar = this.down('pagingtoolbar');
115 xtype: 'pagingtoolbar', 116 if (ptbar) {
116 id: 'ptbar', 117 this.removeDocked(ptbar);
117 dock: 'bottom', 118 }
118 store: store, 119
119 displayInfo: true 120 this.down('button[action=add]').enable();
120 }]); 121 this.addDocked([{
122 xtype: 'pagingtoolbar',
123 dock: 'bottom',
124 store: store,
125 displayInfo: true
126 }]);
127 }
121 } 128 }
122 }); 129 });

http://lada.wald.intevation.org