Mercurial > lada > lada-client
comparison app/view/widgets/LadaForm.js @ 188:0fcec0c8c072
Removed unused code.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 05 Jul 2013 14:47:19 +0200 |
parents | df5dcdff7b69 |
children | 214d1b274a50 |
comparison
equal
deleted
inserted
replaced
187:ef7b8499c924 | 188:0fcec0c8c072 |
---|---|
89 this.fireEvent('savefailure', this); | 89 this.fireEvent('savefailure', this); |
90 } | 90 } |
91 }, | 91 }, |
92 scope: this | 92 scope: this |
93 }); | 93 }); |
94 | |
95 //this.model.save({ | |
96 // callback: function(records, operation) { | |
97 // this.parseResponse(operation); | |
98 // if (operation.wasSuccessful()) { | |
99 // console.log('Save was successfull'); | |
100 // this.fireEvent('savesuccess', this, records, operation); | |
101 // } else { | |
102 // console.log('Save was not successfull'); | |
103 // this.form.markInvalid(this.errors); | |
104 // this.fireEvent('savefailure', this, records, operation); | |
105 // } | |
106 // if (callback) { | |
107 // callback.call(scope || this, this, operation.wasSuccessful(), this.model); | |
108 // } | |
109 // }, | |
110 // scope: this | |
111 //}); | |
112 } | 94 } |
113 }, | 95 }, |
114 | 96 |
115 onModelLoadSuccess: function(record, operation) { | 97 onModelLoadSuccess: function(record, operation) { |
116 this.bindModel(record); | 98 this.bindModel(record); |
146 this.setReadOnly(json.readonly); | 128 this.setReadOnly(json.readonly); |
147 } else { | 129 } else { |
148 this.setReadOnly(true); | 130 this.setReadOnly(true); |
149 } | 131 } |
150 } | 132 } |
151 // This parse method is used if the model.save() method is used to trigger | |
152 // a request on the server side. In this case the response object is | |
153 // different. | |
154 //parseResponse: function(operation) { | |
155 // this.errors = this.translateReturnCodes(operation.request.scope.reader.jsonData["errors"]); | |
156 // this.warnings = this.translateReturnCodes(operation.request.scope.reader.jsonData["warnings"]); | |
157 // this.message = Lada.getApplication().bundle.getMsg(operation.request.scope.reader.jsonData["message"]); | |
158 // //this.setReadOnly(true); | |
159 //} | |
160 | |
161 }); | 133 }); |