[Lada-commits] [PATCH] Changed 'Solldatum' fields to readonly fields without default value

Wald Commits scm-commit at wald.intevation.org
Fri Sep 11 14:19:09 CEST 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1441973932 -7200
# Node ID c75f13578315324c8b13d80891840039f6b68ca1
# Parent  81e7c847cb584c26e10813b5a1407ae637d98559
Changed 'Solldatum' fields to readonly fields without default value.

diff -r 81e7c847cb58 -r c75f13578315 app/model/Probe.js
--- a/app/model/Probe.js	Fri Sep 11 12:20:20 2015 +0200
+++ b/app/model/Probe.js	Fri Sep 11 14:18:52 2015 +0200
@@ -104,8 +104,7 @@
                 return v;
             }
             return new Date(v);
-        },
-        defaultValue: new Date()
+        }
     }, {
         name: 'solldatumEnde',
         type: 'date',
@@ -114,8 +113,7 @@
                 return v;
             }
             return new Date(v);
-        },
-        defaultValue: new Date()
+        }
     }, {
         name: 'readonly',
         type: 'boolean',
diff -r 81e7c847cb58 -r c75f13578315 app/view/form/Probe.js
--- a/app/view/form/Probe.js	Fri Sep 11 12:20:20 2015 +0200
+++ b/app/view/form/Probe.js	Fri Sep 11 14:18:52 2015 +0200
@@ -193,20 +193,24 @@
                         },
                         items: [{
                             xtype: 'datetime',
+                            emptyText: ' ',
                             fieldLabel: 'Sollzeitraum von',
                             labelWidth: 120,
                             margin: '0, 5, 5, 5',
                             name: 'solldatumBeginn',
                             format: 'd.m.Y H:i',
-                            period: 'start'
+                            period: 'start',
+                            readOnly: true
                         }, {
                             xtype: 'datetime',
+                            emptyText: ' ',
                             fieldLabel: 'bis',
                             labelWidth: 10,
                             margin: '0, 5, 5, 5',
                             name: 'solldatumEnde',
                             format: 'd.m.Y H:i',
-                            period: 'end'
+                            period: 'end',
+                            readOnly: true
                         }]
                     }, {
                         xtype: 'fset',
@@ -427,8 +431,6 @@
         this.down('cbox[name=umwId]').setReadOnly(value);
         this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
         this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value);
-        this.down('datetime[name=solldatumBeginn]').setReadOnly(value);
-        this.down('datetime[name=solldatumEnde]').setReadOnly(value);
         this.down('numberfield[name=probeNehmerId]').setReadOnly(value);
 
         //Deskriptoren
diff -r 81e7c847cb58 -r c75f13578315 app/view/widget/base/Datetime.js
--- a/app/view/widget/base/Datetime.js	Fri Sep 11 12:20:20 2015 +0200
+++ b/app/view/widget/base/Datetime.js	Fri Sep 11 14:18:52 2015 +0200
@@ -25,14 +25,16 @@
     initComponent: function() {
         var dateField = Ext.create('Lada.view.widget.base.DateTimeField', {
             format: this.format || 'd.m.Y H:i',
-            emptyText: 'Wählen Sie einen Zeitpunkt',
+            emptyText: this.emptyText || 'Wählen Sie einen Zeitpunkt',
             fieldLabel: this.fieldLabel,
             labelWidth: this.labelWidth,
             flex: 1,
             name: this.name,
             msgTarget: 'none',
             listeners: this.listeners,
-            period: this.period
+            readOnly: this.readOnly || false,
+            period: this.period,
+            value: this.value
         });
         this.items = [dateField, {
             xtype: 'image',


More information about the Lada-commits mailing list