Mercurial > lada > lada-client
changeset 523:6ad453afbc31
Make tables editable for 'Status'
See LSB 3.5
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Tue, 16 Dec 2014 16:20:15 +0100 |
parents | de1acaf21db3 |
children | 8972f008dfb1 |
files | app/controller/Status.js app/view/status/List.js |
diffstat | 2 files changed, 27 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Status.js Tue Dec 16 15:58:43 2014 +0100 +++ b/app/controller/Status.js Tue Dec 16 16:20:15 2014 +0100 @@ -23,9 +23,9 @@ addListeners: function() { this.control({ - 'statuslist': { - itemdblclick: this.editItem - }, + //'statuslist': { + // itemdblclick: this.editItem + //}, 'statuslist toolbar button[action=add]': { click: this.addItem },
--- a/app/view/status/List.js Tue Dec 16 15:58:43 2014 +0100 +++ b/app/view/status/List.js Tue Dec 16 16:20:15 2014 +0100 @@ -27,6 +27,11 @@ probeId: 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,17 +49,32 @@ }]; this.columns = [{ header: 'Erzeuger', - dataIndex: 'erzeuger' + dataIndex: 'erzeuger', + editor: { + allowBlank: false + } }, { header: 'Status', - dataIndex: 'status' + dataIndex: 'status', + 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: 'kommentar', - flex: 1 + flex: 1, + editor: { + allowBlank: true + } }]; this.callParent(arguments); }