# HG changeset patch # User Dustin Demuth # Date 1427466152 -3600 # Node ID c632c7c34029443b8eb53052976fbfec0b19c14c # Parent 3e4be37e3e46b5bab115a2e2dc6f4c5f46ea853c added disable/enableChildren Method diff -r 3e4be37e3e46 -r c632c7c34029 app/view/window/MessungCreate.js --- a/app/view/window/MessungCreate.js Fri Mar 27 14:48:42 2015 +0100 +++ b/app/view/window/MessungCreate.js Fri Mar 27 15:22:32 2015 +0100 @@ -59,6 +59,15 @@ }, clearMessages: function() { //todo this is a stub + }, + + disableChildren: function(){ + //intentionally! + return true; + }, + + enableChildren: function(){ + //intentionally! + return true; } - }); diff -r 3e4be37e3e46 -r c632c7c34029 app/view/window/MessungEdit.js --- a/app/view/window/MessungEdit.js Fri Mar 27 14:48:42 2015 +0100 +++ b/app/view/window/MessungEdit.js Fri Mar 27 15:22:32 2015 +0100 @@ -165,10 +165,10 @@ }, setMessages: function(errors, warnings) { - //todo this is a stub + this.down('messungform').setMessages(errors, warnings); }, clearMessages: function() { - //todo this is a stub + this.down('messungform').clearMessages(); } }); diff -r 3e4be37e3e46 -r c632c7c34029 app/view/window/ProbeCreate.js --- a/app/view/window/ProbeCreate.js Fri Mar 27 14:48:42 2015 +0100 +++ b/app/view/window/ProbeCreate.js Fri Mar 27 15:22:32 2015 +0100 @@ -59,5 +59,15 @@ clearMessages: function() { this.down('probeform').clearMessages(); + }, + + disableChildren: function(){ + //intentionally! + return true; + }, + + enableChildren: function(){ + //intentionally! + return true; } }); diff -r 3e4be37e3e46 -r c632c7c34029 app/view/window/ProbeEdit.js --- a/app/view/window/ProbeEdit.js Fri Mar 27 14:48:42 2015 +0100 +++ b/app/view/window/ProbeEdit.js Fri Mar 27 15:22:32 2015 +0100 @@ -146,7 +146,11 @@ }, disableChildren: function(){ - this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); + if (!this.record.get('owner')) { + // Disable only when the User is not the owner of the Probe + // Works in symbiosis with success callback some lines above. + this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true); + } this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true);