Mercurial > lada > lada-client
changeset 536:fbe81214026a
Make tables editable for 'Kommentare'
See LSB 3.5
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Wed, 17 Dec 2014 15:34:04 +0100 |
parents | 60c5c796a57e |
children | a12c9c97d3cb |
files | app/controller/Kommentare.js app/view/kommentare/List.js |
diffstat | 2 files changed, 23 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Kommentare.js Wed Dec 17 14:57:03 2014 +0100 +++ b/app/controller/Kommentare.js Wed Dec 17 15:34:04 2014 +0100 @@ -30,9 +30,9 @@ addListeners: function() { this.control({ - 'kommentarelist': { - itemdblclick: this.editItem - }, + //'kommentarelist': { + // itemdblclick: this.editItem + //}, 'kommentarelist toolbar button[action=add]': { click: this.addItem },
--- a/app/view/kommentare/List.js Wed Dec 17 14:57:03 2014 +0100 +++ b/app/view/kommentare/List.js Wed Dec 17 15:34:04 2014 +0100 @@ -29,6 +29,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', @@ -45,14 +50,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); }