Mercurial > lada > lada-client
comparison app/view/grid/MessprogrammKategorie.js @ 1011:6afdbc8ee920 stammdatengrids
Tidied up code, fixed buttons in Messprogrammkategoriegrid by renaming the alias of the grid
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 21 Jan 2016 10:54:20 +0100 |
parents | 15d8c64049d1 |
children | e9e974d31924 |
comparison
equal
deleted
inserted
replaced
1006:04ac7bb4494f | 1011:6afdbc8ee920 |
---|---|
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: { |
97 } | 97 } |
98 }, { | 98 }, { |
99 header: i18n.getMsg('letzteAenderung'), | 99 header: i18n.getMsg('letzteAenderung'), |
100 dataIndex: 'letzteAenderung' | 100 dataIndex: 'letzteAenderung' |
101 }]; | 101 }]; |
102 this.listeners = { | |
103 select: { | |
104 fn: this.activateRemoveButton, | |
105 scope: this | |
106 }, | |
107 deselect: { | |
108 fn: this.deactivateRemoveButton, | |
109 scope: this | |
110 } | |
111 }; | |
112 this.callParent(arguments); | 102 this.callParent(arguments); |
113 }, | 103 }, |
114 | 104 |
115 /** | 105 /** |
116 * This sets the Store of this Grid | 106 * This sets the Store of this Grid |
118 setStore: function(store){ | 108 setStore: function(store){ |
119 var i18n = Lada.getApplication().bundle; | 109 var i18n = Lada.getApplication().bundle; |
120 | 110 |
121 this.removeDocked(Ext.getCmp('ptbar'), true); | 111 this.removeDocked(Ext.getCmp('ptbar'), true); |
122 this.reconfigure(store); | 112 this.reconfigure(store); |
113 this.down('button[action=add]').enable(); | |
123 this.addDocked([{ | 114 this.addDocked([{ |
124 xtype: 'pagingtoolbar', | 115 xtype: 'pagingtoolbar', |
125 id: 'ptbar', | 116 id: 'ptbar', |
126 dock: 'bottom', | 117 dock: 'bottom', |
127 store: store, | 118 store: store, |