Mercurial > lada > lada-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
692:c31644b3d445 | 693:817524db4017 |
---|---|
27 autoScroll: true, | 27 autoScroll: true, |
28 layout: 'fit', | 28 layout: 'fit', |
29 constrain: true, | 29 constrain: true, |
30 | 30 |
31 record: null, | 31 record: null, |
32 | |
32 | 33 |
33 initComponent: function() { | 34 initComponent: function() { |
34 if (this.record === null) { | 35 if (this.record === null) { |
35 Ext.Msg.alert('Keine valide Probe ausgewählt!'); | 36 Ext.Msg.alert('Keine valide Probe ausgewählt!'); |
36 this.callParent(arguments); | 37 this.callParent(arguments); |
120 this.setMessages(json.errors, json.warnings); | 121 this.setMessages(json.errors, json.warnings); |
121 } | 122 } |
122 }, | 123 }, |
123 scope: this | 124 scope: this |
124 }); | 125 }); |
126 | |
127 // If the Probe is ReadOnly, disable Inputfields and grids | |
125 if (this.record.get('readonly') == true){ | 128 if (this.record.get('readonly') == true){ |
126 this.down('probeform').setReadOnly(true); | 129 this.down('probeform').setReadOnly(true); |
127 this.disableChildren(); | 130 this.disableChildren(); |
131 | |
132 //The Owner of a Probe is always allowed to add a Messung. | |
133 // ToDo ist it required to check if a Status exists? | |
134 if (this.record.get('owner') == true){ | |
135 //allow to add Messungen | |
136 this.down('fset[name=messungen]').down('messunggrid').down('button[name=add]').enable(); | |
137 } | |
128 } | 138 } |
129 }, | 139 }, |
130 | 140 |
131 disableChildren: function(){ | 141 disableChildren: function(){ |
132 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); | 142 this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); |