[Lada-commits] [PATCH] PKommentar an MKommentar grid modified

Wald Commits scm-commit at wald.intevation.org
Wed Oct 14 11:40:31 CEST 2015


# HG changeset patch
# User Michael Stanko <mstanko at bfs.de>
# Date 1444815625 -7200
# Node ID 0a233865a9c39a70867d749605dc2a4f83f8d9c6
# Parent  f2001df0e4948fb9e5f03699e0c9b431e00dc361
PKommentar an MKommentar grid modified

diff -r f2001df0e494 -r 0a233865a9c3 app/controller/grid/MKommentar.js
--- a/app/controller/grid/MKommentar.js	Fri Oct 02 14:58:59 2015 +0200
+++ b/app/controller/grid/MKommentar.js	Wed Oct 14 11:40:25 2015 +0200
@@ -40,7 +40,8 @@
      * On failure it displays a message
      */
     gridSave: function(editor, context) {
-        context.record.save({
+    context.record.set('datum', new Date());
+    context.record.save({
             success: function(record, response) {
                 context.grid.initData();
                 context.grid.up('window').initData();
diff -r f2001df0e494 -r 0a233865a9c3 app/controller/grid/PKommentar.js
--- a/app/controller/grid/PKommentar.js	Fri Oct 02 14:58:59 2015 +0200
+++ b/app/controller/grid/PKommentar.js	Wed Oct 14 11:40:25 2015 +0200
@@ -38,6 +38,7 @@
      * On failure it displays a message
      */
      gridSave: function(editor, context) {
+        context.record.set('datum', new Date());
         context.record.save({
             success: function() {
                 context.grid.store.reload();
diff -r f2001df0e494 -r 0a233865a9c3 app/view/grid/MKommentar.js
--- a/app/view/grid/MKommentar.js	Fri Oct 02 14:58:59 2015 +0200
+++ b/app/view/grid/MKommentar.js	Wed Oct 14 11:40:25 2015 +0200
@@ -59,6 +59,12 @@
             }]
         }];
         this.columns = [{
+            header: 'erstellt',
+            dataIndex: 'datum',
+            xtype: 'datecolumn',
+            format: 'd.m.Y H:i',
+            width: 110,
+        }, {
             header: 'Erzeuger',
             dataIndex: 'erzeuger',
             renderer: function(value) {
@@ -77,17 +83,6 @@
                 editable: false
             }
         }, {
-            header: 'Datum',
-            dataIndex: 'datum',
-            xtype: 'datecolumn',
-            format: 'd.m.Y',
-            editor: {
-                xtype: 'datefield',
-                allowBlank: false,
-                format: 'd.m.Y',
-                maxValue: Ext.Date.format(new Date(), 'd.m.Y')
-            }
-        }, {
             header: 'Text',
             dataIndex: 'text',
             flex: 1,
diff -r f2001df0e494 -r 0a233865a9c3 app/view/grid/PKommentar.js
--- a/app/view/grid/PKommentar.js	Fri Oct 02 14:58:59 2015 +0200
+++ b/app/view/grid/PKommentar.js	Wed Oct 14 11:40:25 2015 +0200
@@ -65,6 +65,12 @@
             }]
         }];
         this.columns = [{
+            header: 'erstellt',
+            dataIndex: 'datum',
+            xtype: 'datecolumn',
+            format: 'd.m.Y H:i',
+            width: 110,
+        }, {
             header: 'Erzeuger',
             dataIndex: 'erzeuger',
             width: 140,
@@ -84,15 +90,6 @@
                 allowBlank: false
             }
         }, {
-            header: '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,
diff -r f2001df0e494 -r 0a233865a9c3 app/view/window/ProbeEdit.js
--- a/app/view/window/ProbeEdit.js	Fri Oct 02 14:58:59 2015 +0200
+++ b/app/view/window/ProbeEdit.js	Wed Oct 14 11:40:25 2015 +0200
@@ -97,7 +97,7 @@
                 padding: '5, 5',
                 margin: 5,
                 collapsible: true,
-                collapsed: true,
+                collapsed: false,
                 items: [{
                     xtype: 'probenzusatzwertgrid',
                     recordId: this.record.get('id')
@@ -109,7 +109,7 @@
                 padding: '5, 5',
                 margin: 5,
                 collapsible: true,
-                collapsed: true,
+                collapsed: false,
                 items: [{
                     xtype: 'pkommentargrid',
                     recordId: this.record.get('id')


More information about the Lada-commits mailing list