]> source.dussan.org Git - jquery.git/commitdiff
Minor changes to enforce JQuery Core Style Guidelines.
authorjaubourg <j@ubourg.net>
Fri, 11 Feb 2011 23:13:38 +0000 (00:13 +0100)
committerjaubourg <j@ubourg.net>
Fri, 11 Feb 2011 23:14:11 +0000 (00:14 +0100)
src/ajax.js
src/ajax/xhr.js

index b35952f0b5fa06d3532d59bfe302b9701af9bbb7..790585dd0bf40b28f149bce046eaa1ee8152653c 100644 (file)
@@ -451,7 +451,7 @@ jQuery.extend({
                // Callback for when everything is done
                // It is defined here because jslint complains if it is declared
                // at the end of the function (which would be more logical and readable)
-               function done( status, statusText, responses, headers) {
+               function done( status, statusText, responses, headers ) {
 
                        // Called once
                        if ( state === 2 ) {
index 9c8790aba79bbc8b1bcabe95a11e87781aa384f7..a6473dd87a61557a7b0aff4f24ce74f40b01ec42 100644 (file)
@@ -26,7 +26,7 @@ function createStandardXHR() {
 
 function createActiveXHR() {
        try {
-               return new window.ActiveXObject("Microsoft.XMLHTTP");
+               return new window.ActiveXObject( "Microsoft.XMLHTTP" );
        } catch( e ) {}
 }
 
@@ -166,14 +166,16 @@ if ( jQuery.support.ajax ) {
                                                                        }
 
                                                                        // Filter status for non standard behaviors
-                                                                       status =
-                                                                               // If the request is local and we have data: assume a success
-                                                                               // (success with no data won't get notified, that's the best we
-                                                                               // can do given current implementations)
-                                                                               !status && s.isLocal && !s.crossDomain ?
-                                                                               ( responses.text ? 200 : 404 ) :
-                                                                               // IE - #1450: sometimes returns 1223 when it should be 204
-                                                                               ( status === 1223 ? 204 : status );
+
+                                                                       // If the request is local and we have data: assume a success
+                                                                       // (success with no data won't get notified, that's the best we
+                                                                       // can do given current implementations)
+                                                                       if ( !status && s.isLocal && !s.crossDomain ) {
+                                                                               status = responses.text ? 200 : 404;
+                                                                       // IE - #1450: sometimes returns 1223 when it should be 204
+                                                                       } else if ( status === 1223 ) {
+                                                                               status = 204;
+                                                                       }
                                                                }
                                                        }
                                                } catch( firefoxAccessException ) {