Ticket #10191: ajax.js.diff
| File ajax.js.diff, 1.3 kB (added by kendsnyder, 2 years ago) |
|---|
-
ajax.js
old new 162 162 163 163 success: function() { 164 164 var status = this.getStatus(); 165 return !status || (status >= 200 && status < 300);165 return status >= 200 && status < 300; 166 166 }, 167 167 168 168 getStatus: function() { 169 169 try { 170 if (Prototype.Browser.IE && [1223, 12002, 12029, 12030, 12031, 12152] 171 .include(this.transport.status)) return 0; 170 172 return this.transport.status || 0; 171 173 } catch (e) { return 0 } 172 174 }, … … 177 179 if (state == 'Complete') { 178 180 try { 179 181 this._complete = true; 180 (this.options['on' + response.status] 181 || this.options['on' + (this.success() ? 'Success' : 'Failure')] 182 || Prototype.emptyFunction)(response, response.headerJSON); 182 if (window.location.protocol == 'file') 183 (this.options['onSuccess'] 184 || Prototype.emptyFunction)(response, response.headerJSON); 185 else 186 (this.options['on' + response.status] 187 || this.options['on' + (this.success() ? 'Success' : 'Failure')] 188 || Prototype.emptyFunction)(response, response.headerJSON); 183 189 } catch (e) { 184 190 this.dispatchException(e); 185 191 }