Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
a9f1346c
Commit
a9f1346c
authored
Oct 26, 2011
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core styleguide cleanup. Fixes #10586
parent
fc13f5b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
ajax.js
src/ajax.js
+11
-11
deferred.js
src/deferred.js
+2
-2
No files found.
src/ajax.js
View file @
a9f1346c
...
@@ -82,7 +82,7 @@ function addToPrefiltersOrTransports( structure ) {
...
@@ -82,7 +82,7 @@ function addToPrefiltersOrTransports( structure ) {
placeBefore
;
placeBefore
;
// For each dataType in the dataTypeExpression
// For each dataType in the dataTypeExpression
for
(
;
i
<
length
;
i
++
)
{
for
(
;
i
<
length
;
i
++
)
{
dataType
=
dataTypes
[
i
];
dataType
=
dataTypes
[
i
];
// We control if we're asked to add before
// We control if we're asked to add before
// any existing element
// any existing element
...
@@ -113,7 +113,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
...
@@ -113,7 +113,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
executeOnly
=
(
structure
===
prefilters
),
executeOnly
=
(
structure
===
prefilters
),
selection
;
selection
;
for
(
;
i
<
length
&&
(
executeOnly
||
!
selection
);
i
++
)
{
for
(
;
i
<
length
&&
(
executeOnly
||
!
selection
);
i
++
)
{
selection
=
list
[
i
](
options
,
originalOptions
,
jqXHR
);
selection
=
list
[
i
](
options
,
originalOptions
,
jqXHR
);
// If we got redirected to another dataType
// If we got redirected to another dataType
// we try there if executing only and not done already
// we try there if executing only and not done already
...
@@ -144,7 +144,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
...
@@ -144,7 +144,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
function
ajaxExtend
(
target
,
src
)
{
function
ajaxExtend
(
target
,
src
)
{
var
key
,
deep
,
var
key
,
deep
,
flatOptions
=
jQuery
.
ajaxSettings
.
flatOptions
||
{};
flatOptions
=
jQuery
.
ajaxSettings
.
flatOptions
||
{};
for
(
key
in
src
)
{
for
(
key
in
src
)
{
if
(
src
[
key
]
!==
undefined
)
{
if
(
src
[
key
]
!==
undefined
)
{
(
flatOptions
[
key
]
?
target
:
(
deep
||
(
deep
=
{}
)
)
)[
key
]
=
src
[
key
];
(
flatOptions
[
key
]
?
target
:
(
deep
||
(
deep
=
{}
)
)
)[
key
]
=
src
[
key
];
}
}
...
@@ -553,7 +553,7 @@ jQuery.extend({
...
@@ -553,7 +553,7 @@ jQuery.extend({
// We extract error from statusText
// We extract error from statusText
// then normalize statusText and status for non-aborts
// then normalize statusText and status for non-aborts
error
=
statusText
;
error
=
statusText
;
if
(
!
statusText
||
status
)
{
if
(
!
statusText
||
status
)
{
statusText
=
"error"
;
statusText
=
"error"
;
if
(
status
<
0
)
{
if
(
status
<
0
)
{
status
=
0
;
status
=
0
;
...
@@ -604,7 +604,7 @@ jQuery.extend({
...
@@ -604,7 +604,7 @@ jQuery.extend({
if
(
map
)
{
if
(
map
)
{
var
tmp
;
var
tmp
;
if
(
state
<
2
)
{
if
(
state
<
2
)
{
for
(
tmp
in
map
)
{
for
(
tmp
in
map
)
{
statusCode
[
tmp
]
=
[
statusCode
[
tmp
],
map
[
tmp
]
];
statusCode
[
tmp
]
=
[
statusCode
[
tmp
],
map
[
tmp
]
];
}
}
}
else
{
}
else
{
...
@@ -859,7 +859,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) {
...
@@ -859,7 +859,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) {
firstDataType
;
firstDataType
;
// Fill responseXXX fields
// Fill responseXXX fields
for
(
type
in
responseFields
)
{
for
(
type
in
responseFields
)
{
if
(
type
in
responses
)
{
if
(
type
in
responses
)
{
jqXHR
[
responseFields
[
type
]
]
=
responses
[
type
];
jqXHR
[
responseFields
[
type
]
]
=
responses
[
type
];
}
}
...
@@ -938,13 +938,13 @@ function ajaxConvert( s, response ) {
...
@@ -938,13 +938,13 @@ function ajaxConvert( s, response ) {
conv2
;
conv2
;
// For each dataType in the chain
// For each dataType in the chain
for
(
i
=
1
;
i
<
length
;
i
++
)
{
for
(
i
=
1
;
i
<
length
;
i
++
)
{
// Create converters map
// Create converters map
// with lowercased keys
// with lowercased keys
if
(
i
===
1
)
{
if
(
i
===
1
)
{
for
(
key
in
s
.
converters
)
{
for
(
key
in
s
.
converters
)
{
if
(
typeof
key
===
"string"
)
{
if
(
typeof
key
===
"string"
)
{
converters
[
key
.
toLowerCase
()
]
=
s
.
converters
[
key
];
converters
[
key
.
toLowerCase
()
]
=
s
.
converters
[
key
];
}
}
}
}
...
@@ -955,7 +955,7 @@ function ajaxConvert( s, response ) {
...
@@ -955,7 +955,7 @@ function ajaxConvert( s, response ) {
current
=
dataTypes
[
i
];
current
=
dataTypes
[
i
];
// If current is auto dataType, update it to prev
// If current is auto dataType, update it to prev
if
(
current
===
"*"
)
{
if
(
current
===
"*"
)
{
current
=
prev
;
current
=
prev
;
// If no auto and dataTypes are actually different
// If no auto and dataTypes are actually different
}
else
if
(
prev
!==
"*"
&&
prev
!==
current
)
{
}
else
if
(
prev
!==
"*"
&&
prev
!==
current
)
{
...
@@ -967,7 +967,7 @@ function ajaxConvert( s, response ) {
...
@@ -967,7 +967,7 @@ function ajaxConvert( s, response ) {
// If there is no direct converter, search transitively
// If there is no direct converter, search transitively
if
(
!
conv
)
{
if
(
!
conv
)
{
conv2
=
undefined
;
conv2
=
undefined
;
for
(
conv1
in
converters
)
{
for
(
conv1
in
converters
)
{
tmp
=
conv1
.
split
(
" "
);
tmp
=
conv1
.
split
(
" "
);
if
(
tmp
[
0
]
===
prev
||
tmp
[
0
]
===
"*"
)
{
if
(
tmp
[
0
]
===
prev
||
tmp
[
0
]
===
"*"
)
{
conv2
=
converters
[
tmp
[
1
]
+
" "
+
current
];
conv2
=
converters
[
tmp
[
1
]
+
" "
+
current
];
...
...
src/deferred.js
View file @
a9f1346c
...
@@ -66,7 +66,7 @@ jQuery.extend({
...
@@ -66,7 +66,7 @@ jQuery.extend({
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
obj
=
promise
;
obj
=
promise
;
}
else
{
}
else
{
for
(
var
key
in
promise
)
{
for
(
var
key
in
promise
)
{
obj
[
key
]
=
promise
[
key
];
obj
[
key
]
=
promise
[
key
];
}
}
}
}
...
@@ -124,7 +124,7 @@ jQuery.extend({
...
@@ -124,7 +124,7 @@ jQuery.extend({
};
};
}
}
if
(
length
>
1
)
{
if
(
length
>
1
)
{
for
(
;
i
<
length
;
i
++
)
{
for
(
;
i
<
length
;
i
++
)
{
if
(
args
[
i
]
&&
args
[
i
].
promise
&&
jQuery
.
isFunction
(
args
[
i
].
promise
)
)
{
if
(
args
[
i
]
&&
args
[
i
].
promise
&&
jQuery
.
isFunction
(
args
[
i
].
promise
)
)
{
args
[
i
].
promise
().
then
(
resolveFunc
(
i
),
deferred
.
reject
,
progressFunc
(
i
)
);
args
[
i
].
promise
().
then
(
resolveFunc
(
i
),
deferred
.
reject
,
progressFunc
(
i
)
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment