diff app/view/window/Messprogramm.js @ 762:1f3837b513d9

Only disable Add/Remove buttons of Messwertgrid and not the whole grid when no record is present
author Dustin Demuth <dustin@intevation.de>
date Fri, 08 May 2015 12:37:36 +0200
parents 2e7e1a8bf79f
children ba8c0e754979
line wrap: on
line diff
--- 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);
         }
     },

http://lada.wald.intevation.org