Mercurial > lada > lada-client
comparison app/view/grid/MessprogrammKategorie.js @ 1051:981339d774b8
merged stammdatengrids to default.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 01 Mar 2016 14:12:39 +0100 |
parents | d859fbfc8a53 e9e974d31924 |
children | 070255c0db28 |
comparison
equal
deleted
inserted
replaced
1048:eacf25f071c0 | 1051:981339d774b8 |
---|---|
9 /** | 9 /** |
10 * Grid to list MessprogrammKategorie Stammdaten | 10 * Grid to list MessprogrammKategorie Stammdaten |
11 */ | 11 */ |
12 Ext.define('Lada.view.grid.MessprogrammKategorie', { | 12 Ext.define('Lada.view.grid.MessprogrammKategorie', { |
13 extend: 'Ext.grid.Panel', | 13 extend: 'Ext.grid.Panel', |
14 alias: 'widget.mkgrid', | 14 alias: 'widget.messprogrammkategoriegrid', |
15 | 15 |
16 // minHeight and deferEmptyText are needed to be able to show the | 16 // minHeight and deferEmptyText are needed to be able to show the |
17 // emptyText message. | 17 // emptyText message. |
18 minHeight: 110, | 18 minHeight: 110, |
19 viewConfig: { | 19 viewConfig: { |
44 this.dockedItems = [{ | 44 this.dockedItems = [{ |
45 xtype: 'toolbar', | 45 xtype: 'toolbar', |
46 dock: 'top', | 46 dock: 'top', |
47 items: [{ | 47 items: [{ |
48 xtype: 'tbtext', | 48 xtype: 'tbtext', |
49 id: 'tbtitle', | |
50 text: i18n.getMsg('mk.gridTitle') | 49 text: i18n.getMsg('mk.gridTitle') |
51 }, | 50 }, |
52 '->', | 51 '->', |
53 { | 52 { |
54 text: i18n.getMsg('mk.button.add'), | 53 text: i18n.getMsg('mk.button.add'), |
87 } | 86 } |
88 }, { | 87 }, { |
89 header: i18n.getMsg('mplId'), | 88 header: i18n.getMsg('mplId'), |
90 dataIndex: 'mplId', | 89 dataIndex: 'mplId', |
91 editor: { | 90 editor: { |
91 xtype: 'textfield', | |
92 allowBlank: false | 92 allowBlank: false |
93 } | 93 } |
94 }, { | 94 }, { |
95 header: i18n.getMsg('bezeichnung'), | 95 header: i18n.getMsg('bezeichnung'), |
96 dataIndex: 'bezeichnung', | 96 dataIndex: 'bezeichnung', |
97 editor: { | 97 editor: { |
98 xtype: 'textfield', | |
98 allowBlank: false | 99 allowBlank: false |
99 } | 100 } |
100 }, { | 101 }, { |
101 header: i18n.getMsg('letzteAenderung'), | 102 header: i18n.getMsg('letzteAenderung'), |
102 xtype: 'datecolumn', | 103 xtype: 'datecolumn', |
103 format: 'd.m.Y H:i', | 104 format: 'd.m.Y H:i', |
104 dataIndex: 'letzteAenderung' | 105 dataIndex: 'letzteAenderung' |
105 }]; | 106 }]; |
106 this.listeners = { | |
107 select: { | |
108 fn: this.activateRemoveButton, | |
109 scope: this | |
110 }, | |
111 deselect: { | |
112 fn: this.deactivateRemoveButton, | |
113 scope: this | |
114 } | |
115 }; | |
116 this.callParent(arguments); | 107 this.callParent(arguments); |
117 }, | 108 }, |
118 | 109 |
119 /** | 110 /** |
120 * This sets the Store of this Grid | 111 * This sets the Store of this Grid |
123 var i18n = Lada.getApplication().bundle; | 114 var i18n = Lada.getApplication().bundle; |
124 if (Ext.Array.contains(Lada.funktionen, 4)) { | 115 if (Ext.Array.contains(Lada.funktionen, 4)) { |
125 this.down('button[action=add]').enable(); | 116 this.down('button[action=add]').enable(); |
126 } | 117 } |
127 | 118 |
128 this.removeDocked(Ext.getCmp('ptbar'), true); | 119 if (store) { |
129 this.reconfigure(store); | 120 this.reconfigure(store); |
130 this.addDocked([{ | 121 |
131 xtype: 'pagingtoolbar', | 122 var ptbar = this.down('pagingtoolbar'); |
132 id: 'ptbar', | 123 if (ptbar) { |
133 dock: 'bottom', | 124 this.removeDocked(ptbar); |
134 store: store, | 125 } |
135 displayInfo: true | 126 |
136 }]); | 127 this.down('button[action=add]').enable(); |
128 this.addDocked([{ | |
129 xtype: 'pagingtoolbar', | |
130 dock: 'bottom', | |
131 store: store, | |
132 displayInfo: true | |
133 }]); | |
134 } | |
137 } | 135 } |
138 }); | 136 }); |