Created
June 22, 2012 08:21
-
-
Save lucassus/2971293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index 549b6e0..55d1c5c 100644 | |
--- a/vendor/assets/javascripts/jquery.mockjax.js | |
+++ b/vendor/assets/javascripts/jquery.mockjax.js | |
@@ -328,8 +328,8 @@ | |
@@ -328,8 +328,8 @@ | |
} | |
// Successful response | |
- jsonpComplete( requestSettings, mockHandler ); | |
+ | |
+ jsonpComplete( requestSettings, callbackContext, mockHandler ); | |
if(jQuery.Deferred){ | |
@@ -356,12 +356,11 @@ | |
- | |
data = tmp; | |
- jsonpComplete( requestSettings, mockHandler ); | |
+ | |
+ jsonpComplete( requestSettings, requestSettings, mockHandler ); | |
@@ -376,7 +375,7 @@ | |
} | |
// The JSONP request was successful | |
- function jsonpSuccess(requestSettings, mockHandler) { | |
+ function jsonpSuccess(requestSettings,callbackContext, mockHandler) { | |
// If a local callback was specified, fire it and pass it the data | |
if ( requestSettings.success ) { | |
requestSettings.success.call( callbackContext, ( mockHandler.response ? mockHandler.response.t | |
@@ -389,7 +388,7 @@ | |
} | |
// The JSONP request was completed | |
- function jsonpComplete(requestSettings, mockHandler) { | |
+ function jsonpComplete(requestSettings, callbackContext, mockHandler) { | |
// Process result | |
if ( requestSettings.complete ) { | |
requestSettings.complete.call( callbackContext, {} , status ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment