From a807325f086a4d57229dc4475bfcffef7492e24a Mon Sep 17 00:00:00 2001 From: Kevin Glowacz Date: Thu, 21 Jan 2010 01:43:05 +0000 Subject: [PATCH] (trunk web) work around a context bug in jquery14 --- web/javascript/transmission.remote.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/javascript/transmission.remote.js b/web/javascript/transmission.remote.js index 475cf9fb5..6db446596 100644 --- a/web/javascript/transmission.remote.js +++ b/web/javascript/transmission.remote.js @@ -86,7 +86,7 @@ TransmissionRemote.prototype = if( typeof async != 'boolean' ) async = true; - $.ajax( { + var ajaxSettings = { url: RPC._Root, type: 'POST', contentType: 'json', @@ -94,10 +94,12 @@ TransmissionRemote.prototype = cache: false, data: $.toJSON(data), 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, async: async - } ); + }; + + $.ajax( ajaxSettings ); }, loadDaemonPrefs: function( callback, async ) {