Mercurial > lada > lada-client
diff app/view/window/ProbeEdit.js @ 693:817524db4017
Readonly was missing
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 26 Mar 2015 15:54:50 +0100 |
parents | e88381fb3bdb |
children | b0f1dcdf981d |
line wrap: on
line diff
--- a/app/view/window/ProbeEdit.js Thu Mar 26 14:13:47 2015 +0100 +++ b/app/view/window/ProbeEdit.js Thu Mar 26 15:54:50 2015 +0100 @@ -30,6 +30,7 @@ record: null, + initComponent: function() { if (this.record === null) { Ext.Msg.alert('Keine valide Probe ausgewählt!'); @@ -122,9 +123,18 @@ }, scope: this }); + + // If the Probe is ReadOnly, disable Inputfields and grids if (this.record.get('readonly') == true){ this.down('probeform').setReadOnly(true); this.disableChildren(); + + //The Owner of a Probe is always allowed to add a Messung. + // ToDo ist it required to check if a Status exists? + if (this.record.get('owner') == true){ + //allow to add Messungen + this.down('fset[name=messungen]').down('messunggrid').down('button[name=add]').enable(); + } } },