[Lada-commits] [PATCH 2 of 2] Made Ortform readonly when the probe is readonly

Wald Commits scm-commit at wald.intevation.org
Fri Jul 10 10:08:13 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1436515659 -7200
# Node ID e5f72fb491f4d1cc6e04eb06cfdc7e52344b6719
# Parent  405810eda690ad5e6a03de082f15872d700bfcbb
Made Ortform readonly when the probe is readonly

diff -r 405810eda690 -r e5f72fb491f4 app/view/form/Ort.js
--- a/app/view/form/Ort.js	Fri Jul 10 10:06:46 2015 +0200
+++ b/app/view/form/Ort.js	Fri Jul 10 10:07:39 2015 +0200
@@ -127,7 +127,7 @@
     },
 
     setReadOnly: function(value) {
-        //this.down('location[name=ort]').setReadOnly(value);
+        this.down('location[name=ort]').setReadOnly(value);
         this.down('tfield[name=ortsTyp]').setReadOnly(value);
         this.down('textarea[name=ortszusatztext]').setReadOnly(value);
     }
diff -r 405810eda690 -r e5f72fb491f4 app/view/window/OrtEdit.js
--- a/app/view/window/OrtEdit.js	Fri Jul 10 10:06:46 2015 +0200
+++ b/app/view/window/OrtEdit.js	Fri Jul 10 10:07:39 2015 +0200
@@ -128,6 +128,9 @@
                     });
                 }
                 this.down('ortform').setRecord(record);
+                if (this.probe.get('readonly')) {
+                    this.down('ortform').setReadOnly(true);
+                }
                 this.record = record;
             },
             scope: this


More information about the Lada-commits mailing list