diff app/view/mkommentare/List.js @ 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 6de00657cd87
children 95bad130be98
line wrap: on
line diff
--- 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);
     }

http://lada.wald.intevation.org