Changeset c4cdd7
- Timestamp:
- 04/27/2009 12:55:42 PM (16 years ago)
- Branches:
- 2.0.x, develop, extjs4-port, master
- Children:
- e837493
- Parents:
- a9392f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/ui/web/js/Deluge.Client.js
ra9392f rc4cdd7 44 44 // raw events 45 45 /** 46 * @event ready46 * @event connected 47 47 * Fires when the client has retrieved the list of methods from the server. 48 48 * @param {Ext.ux.util.RpcClient} this 49 49 */ 50 ' ready'50 'connected' 51 51 ); 52 52 this.reloadMethods(); … … 86 86 }, 87 87 88 _onFailure: function(response, options) { 89 if (response.status == 500) { 90 //error 88 _onFailure: function(response, requestOptions) { 89 var options = requestOptions.options; 90 errorObj = { 91 id: options.id, 92 result: null, 93 error: 'HTTP' + response.status 94 } 95 if (Ext.type(options.failure) != 'function') return; 96 if (options.scope) { 97 options.failure.call(options.scope, responseObj.error, responseObj, response); 98 } else { 99 options.failure(responseObj.error, responseObj, response); 91 100 } 92 errorObj = {93 id: options.options.id94 }95 //alert(Ext.encode(errorObj));96 101 }, 97 102 … … 162 167 163 168 this._components = Ext.keys(components); 164 this.fireEvent(' ready', this);169 this.fireEvent('connected', this); 165 170 } 166 171 });
Note:
See TracChangeset
for help on using the changeset viewer.