diff app/controller/Messungen.js @ 229:80df1451b4a9

Set messung readonly if parent probe is readonly
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 17 Jul 2013 11:35:53 +0200
parents 5e056c5edf9a
children 6ac95f587e10
line wrap: on
line diff
--- a/app/controller/Messungen.js	Wed Jul 17 11:06:47 2013 +0200
+++ b/app/controller/Messungen.js	Wed Jul 17 11:35:53 2013 +0200
@@ -4,6 +4,7 @@
         'messungen.Create'
     ],
     stores: [
+        'Proben',
         'Messungen',
         'Messwerte',
         'MKommentare',
@@ -71,6 +72,8 @@
                 messungsId: record.get('messungsId')
             }
         });
+        var probe = this.getProbenStore().getById(record.get('probeId'));
+        record.set('readonly', probe.get('readonly'));
         var view = Ext.widget('messungencreate', {model: record});
         console.log("Loaded Messung with ID " + record.getId()); //outputs ID
     },

http://lada.wald.intevation.org