[Lada-commits] [PATCH 1 of 4] Only disable Add/Remove buttons of Messwertgrid and not the whole grid when no record is present

Wald Commits scm-commit at wald.intevation.org
Fri May 8 16:12:31 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1431081456 -7200
# Node ID 1f3837b513d9718392245d3a42f46b5d8d42097f
# Parent  975183ab775e02bf874c46f475d69cb4257c72de
Only disable Add/Remove buttons of Messwertgrid and not the whole grid when no record is present

diff -r 975183ab775e -r 1f3837b513d9 app/view/window/Messprogramm.js
--- a/app/view/window/Messprogramm.js	Fri May 08 11:49:15 2015 +0200
+++ b/app/view/window/Messprogramm.js	Fri May 08 12:37:36 2015 +0200
@@ -90,7 +90,6 @@
                 items: [{
                     xtype: 'messmethodengrid',
                     recordId: this.record? this.record.get('id') : null,
-                    disabled: this.record? false : true,
                     flex: 1
                 }]
             }]
@@ -116,6 +115,7 @@
         // create a Edit window
         if (this.record) {
             this.setLoading(true);
+            this.down('messmethodengrid').setReadOnly(false);
             Ext.ClassManager.get('Lada.model.Messprogramm').load(this.record.get('id'), {
                 failure: function(record, action) {
                     me.setLoading(false);
@@ -150,6 +150,7 @@
         // Create a Create Window
         else {
             var record = Ext.create('Lada.model.Messprogramm');
+            this.down('messmethodengrid').setReadOnly(true);
             this.down('messprogrammform').setRecord(record);
         }
     },


More information about the Lada-commits mailing list