comparison app/view/window/MessungEdit.js @ 687:aedf0709af92

Applied ReadOnlyParadigm to a Messung Window
author Dustin Demuth <dustin@intevation.de>
date Wed, 25 Mar 2015 15:45:33 +0100
parents 71e8b84d7829
children 6a6d1b02a1a3
comparison
equal deleted inserted replaced
686:14ac75f80ba1 687:aedf0709af92
101 this.setMessages(json.errors, json.warnings); 101 this.setMessages(json.errors, json.warnings);
102 } 102 }
103 }, 103 },
104 scope: this 104 scope: this
105 }); 105 });
106
107 if (this.record.get('readonly') == true){
108 this.down('messungform').setReadOnly(true);
109 this.disableChildren();
110 }
111 },
112
113 disableChildren: function(){
114 this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(true);
115 this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(true);
116 this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(true);
117 },
118
119 enableChildren: function(){
120 this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(false);
121 this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(false);
122 this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(false);
106 }, 123 },
107 124
108 setMessages: function(errors, warnings) { 125 setMessages: function(errors, warnings) {
109 //todo this is a stub 126 //todo this is a stub
110 }, 127 },

http://lada.wald.intevation.org