diff app/controller/Messwert.js @ 362:6a7a9267e00f

Issue56: Changed way how to set the form and window to readonly. Now all dialogs should habe proper readonly settings. Now the Save and Cancel button are displayed as needed.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 15 Aug 2013 14:07:35 +0200
parents fe51239321d9
children 2b886fc38282
line wrap: on
line diff
--- a/app/controller/Messwert.js	Thu Aug 15 14:05:08 2013 +0200
+++ b/app/controller/Messwert.js	Thu Aug 15 14:07:35 2013 +0200
@@ -51,14 +51,16 @@
     },
     editItem: function(grid, record) {
         console.log('Editing Messwert');
-        var probe = this.getProbenStore().getById(record.get('probeId'));
+        record.getAuthInfo(this.initEditWindow)
+        console.log("Loaded Messwert with ID " + record.getId()); //outputs ID
+    },
+    initEditWindow: function(record, readonly, owner) {
         var view = Ext.widget('messwertecreate', {model: record});
-        if (probe.get('readonly') === true) {
+        var ignore = Array();
+        if (readonly) {
             var form = view.down('form');
-            form.setReadOnly(true);
+            form.setReadOnly(true, ignore);
         }
-
-        console.log("Loaded Messwert with ID " + record.getId()); //outputs ID
     },
     deleteItem: function(button) {
         var grid = button.up('grid');

http://lada.wald.intevation.org