(trunk web) work around a context bug in jquery14

This commit is contained in:
Kevin Glowacz 2010-01-21 01:43:05 +00:00
parent 5f785b5a24
commit a807325f08
1 changed files with 5 additions and 3 deletions

View File

@ -86,7 +86,7 @@ TransmissionRemote.prototype =
if( typeof async != 'boolean' ) if( typeof async != 'boolean' )
async = true; async = true;
$.ajax( { var ajaxSettings = {
url: RPC._Root, url: RPC._Root,
type: 'POST', type: 'POST',
contentType: 'json', contentType: 'json',
@ -94,10 +94,12 @@ TransmissionRemote.prototype =
cache: false, cache: false,
data: $.toJSON(data), data: $.toJSON(data),
beforeSend: function(XHR){ remote.appendSessionId(XHR) }, beforeSend: function(XHR){ remote.appendSessionId(XHR) },
error: function(request, error_string, exception){ remote.ajaxError(request, error_string, exception, this) }, error: function(request, error_string, exception){ remote.ajaxError(request, error_string, exception, ajaxSettings) },
success: success, success: success,
async: async async: async
} ); };
$.ajax( ajaxSettings );
}, },
loadDaemonPrefs: function( callback, async ) { loadDaemonPrefs: function( callback, async ) {