# HG changeset patch # User Raimund Renkert # Date 1455790882 -3600 # Node ID 4d4de99bbe53e34a95b493aac1f05b7a01b8dff9 # Parent e4b6b6c5fb898fc31feabd21e5800f31951f4333 Get rid of double setting readOnly status of probe window child elements. diff -r e4b6b6c5fb89 -r 4d4de99bbe53 app/view/grid/Messung.js --- a/app/view/grid/Messung.js Thu Feb 18 11:19:25 2016 +0100 +++ b/app/view/grid/Messung.js Thu Feb 18 11:21:22 2016 +0100 @@ -250,7 +250,8 @@ }, setReadOnly: function(b) { - if (b == true){ + this.readOnly = b; + if (b === true) { //Readonly if (this.getPlugin('rowedit')){ this.getPlugin('rowedit').disable(); diff -r e4b6b6c5fb89 -r 4d4de99bbe53 app/view/grid/Ortszuordnung.js --- a/app/view/grid/Ortszuordnung.js Thu Feb 18 11:19:25 2016 +0100 +++ b/app/view/grid/Ortszuordnung.js Thu Feb 18 11:21:22 2016 +0100 @@ -132,7 +132,8 @@ }, setReadOnly: function(b) { - if (b == true){ + this.readOnly = b; + if (b) { //Readonly if (this.getPlugin('rowedit')){ this.getPlugin('rowedit').disable(); diff -r e4b6b6c5fb89 -r 4d4de99bbe53 app/view/grid/PKommentar.js --- a/app/view/grid/PKommentar.js Thu Feb 18 11:19:25 2016 +0100 +++ b/app/view/grid/PKommentar.js Thu Feb 18 11:21:22 2016 +0100 @@ -131,7 +131,8 @@ }, setReadOnly: function(b) { - if (b == true){ + this.readOnly = b; + if (b) { //Readonly if (this.getPlugin('rowedit')){ this.getPlugin('rowedit').disable(); diff -r e4b6b6c5fb89 -r 4d4de99bbe53 app/view/grid/Probenzusatzwert.js --- a/app/view/grid/Probenzusatzwert.js Thu Feb 18 11:19:25 2016 +0100 +++ b/app/view/grid/Probenzusatzwert.js Thu Feb 18 11:21:22 2016 +0100 @@ -177,7 +177,8 @@ }, setReadOnly: function(b) { - if (b == true){ + this.readOnly = b; + if (b) { //Readonly if (this.getPlugin('rowedit')){ this.getPlugin('rowedit').disable(); diff -r e4b6b6c5fb89 -r 4d4de99bbe53 app/view/window/ProbeEdit.js --- a/app/view/window/ProbeEdit.js Thu Feb 18 11:19:25 2016 +0100 +++ b/app/view/window/ProbeEdit.js Thu Feb 18 11:21:22 2016 +0100 @@ -182,14 +182,10 @@ // 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=messungen]').down('messunggrid').readOnly = true; } this.down('fset[name=orte]').down('ortgrid').setReadOnly(true); - this.down('fset[name=orte]').down('ortgrid').readOnly = true; this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true); - this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = true; this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true); - this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = true; }, /** @@ -197,13 +193,9 @@ */ enableChildren: function() { this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false); - this.down('fset[name=messungen]').down('messunggrid').readOnly = false; this.down('fset[name=orte]').down('ortgrid').setReadOnly(false); - this.down('fset[name=orte]').down('ortgrid').readOnly = false; this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false); - this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = false; this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false); - this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = false; }, /**