comparison app/view/window/ProbeEdit.js @ 696:b0f1dcdf981d

Made the unhandled Errors more talkativew
author Dustin Demuth <dustin@intevation.de>
date Thu, 26 Mar 2015 16:26:24 +0100
parents 817524db4017
children 3e4be37e3e46
comparison
equal deleted inserted replaced
695:d6ef146e1a9f 696:b0f1dcdf981d
110 initData: function() { 110 initData: function() {
111 this.clearMessages(); 111 this.clearMessages();
112 Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), { 112 Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), {
113 failure: function(record, action) { 113 failure: function(record, action) {
114 // TODO 114 // TODO
115 }, 115 console.log("An unhandled Failure occured. See following Response and Record");
116 console.log(response);
117 console.log(record);
118 },
116 success: function(record, response) { 119 success: function(record, response) {
117 this.down('probeform').setRecord(record); 120 this.down('probeform').setRecord(record);
118 this.record = record; 121 this.record = record;
119 var json = Ext.decode(response.response.responseText); 122 var json = Ext.decode(response.response.responseText);
120 if (json) { 123 if (json) {
129 this.down('probeform').setReadOnly(true); 132 this.down('probeform').setReadOnly(true);
130 this.disableChildren(); 133 this.disableChildren();
131 134
132 //The Owner of a Probe is always allowed to add a Messung. 135 //The Owner of a Probe is always allowed to add a Messung.
133 // ToDo ist it required to check if a Status exists? 136 // ToDo ist it required to check if a Status exists?
137 // ToDo this doesn't work here because the owner is unknown when this code
138 // is executed.
134 if (this.record.get('owner') == true){ 139 if (this.record.get('owner') == true){
135 //allow to add Messungen 140 //allow to add Messungen
136 this.down('fset[name=messungen]').down('messunggrid').down('button[name=add]').enable(); 141 this.down('fset[name=messungen]').down('messunggrid').down('button[name=add]').enable();
137 } 142 }
138 } 143 }

http://lada.wald.intevation.org