Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/grid/MessprogrammKategorie.js Tue Jan 26 12:29:59 2016 +0100 +++ b/app/view/grid/MessprogrammKategorie.js Fri Jan 29 14:51:17 2016 +0100 @@ -44,7 +44,6 @@ dock: 'top', items: [{ xtype: 'tbtext', - id: 'tbtitle', text: i18n.getMsg('mk.gridTitle') }, '->', @@ -87,12 +86,14 @@ header: i18n.getMsg('mplId'), dataIndex: 'mplId', editor: { + xtype: 'textfield', allowBlank: false } }, { header: i18n.getMsg('bezeichnung'), dataIndex: 'bezeichnung', editor: { + xtype: 'textfield', allowBlank: false } }, { @@ -108,15 +109,21 @@ setStore: function(store){ var i18n = Lada.getApplication().bundle; - this.removeDocked(Ext.getCmp('ptbar'), true); - this.reconfigure(store); - this.down('button[action=add]').enable(); - this.addDocked([{ - xtype: 'pagingtoolbar', - id: 'ptbar', - dock: 'bottom', - store: store, - displayInfo: true - }]); + if (store) { + this.reconfigure(store); + + var ptbar = this.down('pagingtoolbar'); + if (ptbar) { + this.removeDocked(ptbar); + } + + this.down('button[action=add]').enable(); + this.addDocked([{ + xtype: 'pagingtoolbar', + dock: 'bottom', + store: store, + displayInfo: true + }]); + } } });