comparison 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
comparison
equal deleted inserted replaced
228:08144d625b2b 229:80df1451b4a9
2 extend: 'Ext.app.Controller', 2 extend: 'Ext.app.Controller',
3 views: [ 3 views: [
4 'messungen.Create' 4 'messungen.Create'
5 ], 5 ],
6 stores: [ 6 stores: [
7 'Proben',
7 'Messungen', 8 'Messungen',
8 'Messwerte', 9 'Messwerte',
9 'MKommentare', 10 'MKommentare',
10 'Status', 11 'Status',
11 'Messgroessen' 12 'Messgroessen'
69 params: { 70 params: {
70 probeId: record.get('probeId'), 71 probeId: record.get('probeId'),
71 messungsId: record.get('messungsId') 72 messungsId: record.get('messungsId')
72 } 73 }
73 }); 74 });
75 var probe = this.getProbenStore().getById(record.get('probeId'));
76 record.set('readonly', probe.get('readonly'));
74 var view = Ext.widget('messungencreate', {model: record}); 77 var view = Ext.widget('messungencreate', {model: record});
75 console.log("Loaded Messung with ID " + record.getId()); //outputs ID 78 console.log("Loaded Messung with ID " + record.getId()); //outputs ID
76 }, 79 },
77 deleteMessung: function(button) { 80 deleteMessung: function(button) {
78 // Get selected item in grid 81 // Get selected item in grid

http://lada.wald.intevation.org