changeset 930:efb8cf646771

Changed 'medie' and 'mediadesk' fields to readonly fields
author Michael Stanko <mstanko@bfs.de>
date Tue, 22 Sep 2015 09:32:34 +0200
parents 62665a456dcb
children 746b429917a8
files app/view/form/Probe.js app/view/widget/base/TextField.js
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/form/Probe.js	Fri Sep 11 14:54:43 2015 +0200
+++ b/app/view/form/Probe.js	Tue Sep 22 09:32:34 2015 +0200
@@ -283,6 +283,8 @@
                                     regex: new RegExp('(?:D: ){1}(?:[0-9]{2} ){11}[0-9]{2}'),
                                     regexText: 'Die Deskriptoren haben das falsche Format.<br />'+
                                     'Richtig wäre: D: 99 99 99 99 99 99 99 99 99 99 99 99',
+                                    editable: false,
+                                    readOnly: true,
                                     listeners: {
                                         dirtychange: {
                                             fn: this.updateOnChange,
@@ -293,6 +295,7 @@
                                     xtype: 'textfield',
                                     name: 'media',
                                     margin: '0, 10, 5, 10',
+                                    width: '40%',
                                     enforceMaxLength: true,
                                     editable: false,
                                     readOnly: true,
@@ -309,8 +312,8 @@
                             collapsible: true,
                             collapsed: true,
                             layout: {
-                                type: 'table',
-                                columns: 3
+                                type: 'vbox',
+                                align: 'stretch'
                             },
                             items: this.buildDescriptors()
                         }]
@@ -410,8 +413,8 @@
         this.down('cbox[name=umwId]').clearWarningOrError();
         this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();
         this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError();
-        this.down('datetime[name=solldatumBeginn]').clearWarningOrError();
-        this.down('datetime[name=solldatumEnde]').clearWarningOrError();
+//        this.down('datetime[name=solldatumBeginn]').clearWarningOrError();
+//        this.down('datetime[name=solldatumEnde]').clearWarningOrError();
         //this.down('numberfield[name=probeNehmerId]').clearWarningOrError();
         this.down('fset[name=entnahmePeriod]').clearMessages();
         this.down('fset[name=sollzeitPeriod]').clearMessages();
@@ -424,10 +427,7 @@
         this.down('cbox[name=baId]').setReadOnly(value);
         this.down('chkbox[name=test]').setReadOnly(value);
         this.down('cbox[name=probenartId]').setReadOnly(value);
-        //this.down('cbox[name=netzbetreiberId]').setReadOnly(value);
         this.down('tfield[name=x11]').setReadOnly(value);
-        this.down('textfield[name=media]').setReadOnly(value);
-        this.down('tfield[name=mediaDesk]').setReadOnly(value);
         this.down('cbox[name=umwId]').setReadOnly(value);
         this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
         this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value);
--- a/app/view/widget/base/TextField.js	Fri Sep 11 14:54:43 2015 +0200
+++ b/app/view/widget/base/TextField.js	Tue Sep 22 09:32:34 2015 +0200
@@ -28,6 +28,7 @@
             enforceMaxLength: this.enforceMaxLength || true,
             fieldLabel: this.fieldLabel,
             labelWidth: this.labelWidth,
+            readOnly: this.readOnly || false, 
             listeners: this.listeners
         }, {
             xtype: 'image',

http://lada.wald.intevation.org