@@ 6895-6928 (lines=34) @@ | ||
6892 | ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; |
|
6893 | ||
6894 | // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport |
|
6895 | function addToPrefiltersOrTransports( structure ) { |
|
6896 | ||
6897 | // dataTypeExpression is optional and defaults to "*" |
|
6898 | return function( dataTypeExpression, func ) { |
|
6899 | ||
6900 | if ( typeof dataTypeExpression !== "string" ) { |
|
6901 | func = dataTypeExpression; |
|
6902 | dataTypeExpression = "*"; |
|
6903 | } |
|
6904 | ||
6905 | if ( jQuery.isFunction( func ) ) { |
|
6906 | var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), |
|
6907 | i = 0, |
|
6908 | length = dataTypes.length, |
|
6909 | dataType, |
|
6910 | list, |
|
6911 | placeBefore; |
|
6912 | ||
6913 | // For each dataType in the dataTypeExpression |
|
6914 | for ( ; i < length; i++ ) { |
|
6915 | dataType = dataTypes[ i ]; |
|
6916 | // We control if we're asked to add before |
|
6917 | // any existing element |
|
6918 | placeBefore = /^\+/.test( dataType ); |
|
6919 | if ( placeBefore ) { |
|
6920 | dataType = dataType.substr( 1 ) || "*"; |
|
6921 | } |
|
6922 | list = structure[ dataType ] = structure[ dataType ] || []; |
|
6923 | // then we add to the structure accordingly |
|
6924 | list[ placeBefore ? "unshift" : "push" ]( func ); |
|
6925 | } |
|
6926 | } |
|
6927 | }; |
|
6928 | } |
|
6929 | ||
6930 | // Base inspection function for prefilters and transports |
|
6931 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, |
@@ 6024-6057 (lines=34) @@ | ||
6021 | transports = {}; |
|
6022 | ||
6023 | // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport |
|
6024 | function addToPrefiltersOrTransports( structure ) { |
|
6025 | ||
6026 | // dataTypeExpression is optional and defaults to "*" |
|
6027 | return function( dataTypeExpression, func ) { |
|
6028 | ||
6029 | if ( typeof dataTypeExpression !== "string" ) { |
|
6030 | func = dataTypeExpression; |
|
6031 | dataTypeExpression = "*"; |
|
6032 | } |
|
6033 | ||
6034 | if ( jQuery.isFunction( func ) ) { |
|
6035 | var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), |
|
6036 | i = 0, |
|
6037 | length = dataTypes.length, |
|
6038 | dataType, |
|
6039 | list, |
|
6040 | placeBefore; |
|
6041 | ||
6042 | // For each dataType in the dataTypeExpression |
|
6043 | for(; i < length; i++ ) { |
|
6044 | dataType = dataTypes[ i ]; |
|
6045 | // We control if we're asked to add before |
|
6046 | // any existing element |
|
6047 | placeBefore = /^\+/.test( dataType ); |
|
6048 | if ( placeBefore ) { |
|
6049 | dataType = dataType.substr( 1 ) || "*"; |
|
6050 | } |
|
6051 | list = structure[ dataType ] = structure[ dataType ] || []; |
|
6052 | // then we add to the structure accordingly |
|
6053 | list[ placeBefore ? "unshift" : "push" ]( func ); |
|
6054 | } |
|
6055 | } |
|
6056 | }; |
|
6057 | } |
|
6058 | ||
6059 | //Base inspection function for prefilters and transports |
|
6060 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jXHR, |