changeset 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 08144d625b2b
children 7bea6974fb5b
files app/controller/Messungen.js
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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