Mercurial > lada > lada-client
changeset 524:8972f008dfb1
Make tables editable for 'MKommentare'
See LSB 3.5
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Tue, 16 Dec 2014 16:20:42 +0100 |
parents | 6ad453afbc31 |
children | 5960189e4461 |
files | app/controller/MKommentare.js app/view/mkommentare/List.js |
diffstat | 2 files changed, 25 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/MKommentare.js Tue Dec 16 16:20:15 2014 +0100 +++ b/app/controller/MKommentare.js Tue Dec 16 16:20:42 2014 +0100 @@ -30,9 +30,9 @@ addListeners: function() { this.control({ - 'mkommentarelist': { - itemdblclick: this.editItem - }, + //'mkommentarelist': { + // itemdblclick: this.editItem + //}, 'mkommentarelist toolbar button[action=add]': { click: this.addItem },
--- a/app/view/mkommentare/List.js Tue Dec 16 16:20:15 2014 +0100 +++ b/app/view/mkommentare/List.js Tue Dec 16 16:20:42 2014 +0100 @@ -27,6 +27,13 @@ parentId: null, initComponent: function() { + var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { + clicksToMoveEditor: 1, + autoCancel: false + }); + + this.plugins = [rowEditing]; + this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', @@ -44,14 +51,26 @@ }]; this.columns = [{ header: 'Erzeuger', - dataIndex: 'erzeuger' + dataIndex: 'erzeuger', + editor: { + allowBlank: false + } }, { header: 'Datum', - dataIndex: 'datum' + dataIndex: 'datum', + editor: { + xtype: 'datefield', + allowBlank: false, + format: 'd.m.Y', + maxValue: Ext.Date.format(new Date(), 'd.m.Y') + } }, { header: 'Text', dataIndex: 'text', - flex: 1 + flex: 1, + editor: { + allowBlank: false + } }]; this.callParent(arguments); }