[Lada-commits] [PATCH 3 of 5] Make tables editable for 'Kommentare'
Wald Commits
scm-commit at wald.intevation.org
Wed Dec 17 15:42:30 CET 2014
# HG changeset patch
# User Roland Geider <roland.geider at intevation.de>
# Date 1418826844 -3600
# Node ID fbe81214026ae0c02d744cae5a2b271d8131368c
# Parent 60c5c796a57e22153e111df3f488ae25833b48ca
Make tables editable for 'Kommentare'
See LSB 3.5
diff -r 60c5c796a57e -r fbe81214026a app/controller/Kommentare.js
--- 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
},
diff -r 60c5c796a57e -r fbe81214026a app/view/kommentare/List.js
--- 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);
}
More information about the Lada-commits
mailing list