Mercurial > lada > lada-client
comparison app/controller/Messungen.js @ 281:12ef979e73ce
Partially fixed issue55: Ignore the "fertig" field form when setting the form
into readonly state. TODO: Only ignore the field if the current user is
allowed to edit the messung.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Thu, 08 Aug 2013 11:13:44 +0200 |
parents | f60472df54e3 |
children | 1bda6420c87c |
comparison
equal
deleted
inserted
replaced
280:1afccc0cab90 | 281:12ef979e73ce |
---|---|
78 }); | 78 }); |
79 var probe = this.getProbenStore().getById(record.get('probeId')); | 79 var probe = this.getProbenStore().getById(record.get('probeId')); |
80 var view = Ext.widget('messungenedit', {model: record}); | 80 var view = Ext.widget('messungenedit', {model: record}); |
81 if (probe.get('readonly') === true) { | 81 if (probe.get('readonly') === true) { |
82 var form = view.down('form'); | 82 var form = view.down('form'); |
83 form.setReadOnly(true); | 83 // TODO: Field "fertig" must be editable (issue51). So we need to remove the |
84 // readonly status if the user would be allowed to edit the probe | |
85 // if the "fertig" flag has not been set. (ti) <2013-08-08 10:24> | |
86 var ignore = Array(); | |
87 ignore.push('fertig'); | |
88 form.setReadOnly(true, ignore); | |
84 } | 89 } |
85 console.log("Loaded Messung with ID " + record.getId()); //outputs ID | 90 console.log("Loaded Messung with ID " + record.getId()); //outputs ID |
86 }, | 91 }, |
87 deleteMessung: function(button) { | 92 deleteMessung: function(button) { |
88 // Get selected item in grid | 93 // Get selected item in grid |