Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
414d0a53
Commit
414d0a53
authored
9 years ago
by
XhmikosR
Browse files
Options
Download
Email Patches
Plain Diff
Run `grunt`.
parent
26625935
4 merge requests
!28721
Hot test
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
dist/js/bootstrap.js
+42
-12
dist/js/bootstrap.js
dist/js/bootstrap.min.js
+2
-3
dist/js/bootstrap.min.js
docs/assets/js/customize.min.js
+6
-10
docs/assets/js/customize.min.js
docs/assets/js/raw-files.min.js
+1
-1
docs/assets/js/raw-files.min.js
docs/dist/js/bootstrap.js
+42
-12
docs/dist/js/bootstrap.js
docs/dist/js/bootstrap.min.js
+2
-3
docs/dist/js/bootstrap.min.js
with
95 additions
and
41 deletions
+95
-41
dist/js/bootstrap.js
+
42
-
12
View file @
414d0a53
...
...
@@ -230,14 +230,18 @@ if (typeof jQuery === 'undefined') {
var
$input
=
this
.
$element
.
find
(
'
input
'
)
if
(
$input
.
prop
(
'
type
'
)
==
'
radio
'
)
{
if
(
$input
.
prop
(
'
checked
'
))
changed
=
false
if
(
!
$input
.
prop
(
'
checked
'
)
||
!
this
.
$element
.
hasClass
(
'
active
'
))
$parent
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
$parent
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
this
.
$element
.
addClass
(
'
active
'
)
}
else
if
(
$input
.
prop
(
'
type
'
)
==
'
checkbox
'
)
{
if
((
$input
.
prop
(
'
checked
'
))
!==
this
.
$element
.
hasClass
(
'
active
'
))
changed
=
false
this
.
$element
.
toggleClass
(
'
active
'
)
}
if
(
changed
)
$input
.
prop
(
'
checked
'
,
!
this
.
$element
.
hasClass
(
'
active
'
)).
trigger
(
'
change
'
)
$input
.
prop
(
'
checked
'
,
this
.
$element
.
hasClass
(
'
active
'
))
if
(
changed
)
$input
.
trigger
(
'
change
'
)
}
else
{
this
.
$element
.
attr
(
'
aria-pressed
'
,
!
this
.
$element
.
hasClass
(
'
active
'
))
this
.
$element
.
toggleClass
(
'
active
'
)
}
if
(
changed
)
this
.
$element
.
toggleClass
(
'
active
'
)
}
...
...
@@ -280,7 +284,7 @@ if (typeof jQuery === 'undefined') {
var
$btn
=
$
(
e
.
target
)
if
(
!
$btn
.
hasClass
(
'
btn
'
))
$btn
=
$btn
.
closest
(
'
.btn
'
)
Plugin
.
call
(
$btn
,
'
toggle
'
)
if
(
!
$
(
e
.
target
).
is
(
'
input[type="radio"]
'
))
e
.
preventDefault
()
if
(
!
(
$
(
e
.
target
).
is
(
'
input[type="radio"]
'
)
||
$
(
e
.
target
).
is
(
'
input[type="checkbox"]
'
))
)
e
.
preventDefault
()
})
.
on
(
'
focus.bs.button.data-api blur.bs.button.data-api
'
,
'
[data-toggle^="button"]
'
,
function
(
e
)
{
$
(
e
.
target
).
closest
(
'
.btn
'
).
toggleClass
(
'
focus
'
,
/^focus
(
in
)?
$/
.
test
(
e
.
type
))
...
...
@@ -1265,6 +1269,7 @@ if (typeof jQuery === 'undefined') {
this
.
timeout
=
null
this
.
hoverState
=
null
this
.
$element
=
null
this
.
inState
=
null
this
.
init
(
'
tooltip
'
,
element
,
options
)
}
...
...
@@ -1295,6 +1300,7 @@ if (typeof jQuery === 'undefined') {
this
.
$element
=
$
(
element
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
$viewport
=
this
.
options
.
viewport
&&
$
(
$
.
isFunction
(
this
.
options
.
viewport
)
?
this
.
options
.
viewport
.
call
(
this
,
this
.
$element
)
:
(
this
.
options
.
viewport
.
selector
||
this
.
options
.
viewport
))
this
.
inState
=
{
click
:
false
,
hover
:
false
,
focus
:
false
}
if
(
this
.
$element
[
0
]
instanceof
document
.
constructor
&&
!
this
.
options
.
selector
)
{
throw
new
Error
(
'
`selector` option must be specified when initializing
'
+
this
.
type
+
'
on the window.document object!
'
)
...
...
@@ -1353,16 +1359,20 @@ if (typeof jQuery === 'undefined') {
var
self
=
obj
instanceof
this
.
constructor
?
obj
:
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
)
if
(
self
&&
self
.
$tip
&&
self
.
$tip
.
is
(
'
:visible
'
))
{
self
.
hoverState
=
'
in
'
return
}
if
(
!
self
)
{
self
=
new
this
.
constructor
(
obj
.
currentTarget
,
this
.
getDelegateOptions
())
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
,
self
)
}
if
(
obj
instanceof
$
.
Event
)
{
self
.
inState
[
obj
.
type
==
'
focusin
'
?
'
focus
'
:
'
hover
'
]
=
true
}
if
(
self
.
tip
().
hasClass
(
'
in
'
)
||
self
.
hoverState
==
'
in
'
)
{
self
.
hoverState
=
'
in
'
return
}
clearTimeout
(
self
.
timeout
)
self
.
hoverState
=
'
in
'
...
...
@@ -1374,6 +1384,14 @@ if (typeof jQuery === 'undefined') {
},
self
.
options
.
delay
.
show
)
}
Tooltip
.
prototype
.
isInStateTrue
=
function
()
{
for
(
var
key
in
this
.
inState
)
{
if
(
this
.
inState
[
key
])
return
true
}
return
false
}
Tooltip
.
prototype
.
leave
=
function
(
obj
)
{
var
self
=
obj
instanceof
this
.
constructor
?
obj
:
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
)
...
...
@@ -1383,6 +1401,12 @@ if (typeof jQuery === 'undefined') {
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
,
self
)
}
if
(
obj
instanceof
$
.
Event
)
{
self
.
inState
[
obj
.
type
==
'
focusout
'
?
'
focus
'
:
'
hover
'
]
=
false
}
if
(
self
.
isInStateTrue
())
return
clearTimeout
(
self
.
timeout
)
self
.
hoverState
=
'
out
'
...
...
@@ -1682,7 +1706,13 @@ if (typeof jQuery === 'undefined') {
}
}
self
.
tip
().
hasClass
(
'
in
'
)
?
self
.
leave
(
self
)
:
self
.
enter
(
self
)
if
(
e
)
{
self
.
inState
.
click
=
!
self
.
inState
.
click
if
(
self
.
isInStateTrue
())
self
.
enter
(
self
)
else
self
.
leave
(
self
)
}
else
{
self
.
tip
().
hasClass
(
'
in
'
)
?
self
.
leave
(
self
)
:
self
.
enter
(
self
)
}
}
Tooltip
.
prototype
.
destroy
=
function
()
{
...
...
@@ -2249,7 +2279,7 @@ if (typeof jQuery === 'undefined') {
var
offset
=
this
.
options
.
offset
var
offsetTop
=
offset
.
top
var
offsetBottom
=
offset
.
bottom
var
scrollHeight
=
$
(
document
.
body
).
height
()
var
scrollHeight
=
Math
.
max
(
$
(
document
).
height
(),
$
(
document
.
body
).
height
()
)
if
(
typeof
offset
!=
'
object
'
)
offsetBottom
=
offsetTop
=
offset
if
(
typeof
offsetTop
==
'
function
'
)
offsetTop
=
offset
.
top
(
this
.
$element
)
...
...
This diff is collapsed.
Click to expand it.
dist/js/bootstrap.min.js
+
2
-
3
View file @
414d0a53
This diff is collapsed.
Click to expand it.
docs/assets/js/customize.min.js
+
6
-
10
View file @
414d0a53
This diff is collapsed.
Click to expand it.
docs/assets/js/raw-files.min.js
+
1
-
1
View file @
414d0a53
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.js
+
42
-
12
View file @
414d0a53
...
...
@@ -230,14 +230,18 @@ if (typeof jQuery === 'undefined') {
var
$input
=
this
.
$element
.
find
(
'
input
'
)
if
(
$input
.
prop
(
'
type
'
)
==
'
radio
'
)
{
if
(
$input
.
prop
(
'
checked
'
))
changed
=
false
if
(
!
$input
.
prop
(
'
checked
'
)
||
!
this
.
$element
.
hasClass
(
'
active
'
))
$parent
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
$parent
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
this
.
$element
.
addClass
(
'
active
'
)
}
else
if
(
$input
.
prop
(
'
type
'
)
==
'
checkbox
'
)
{
if
((
$input
.
prop
(
'
checked
'
))
!==
this
.
$element
.
hasClass
(
'
active
'
))
changed
=
false
this
.
$element
.
toggleClass
(
'
active
'
)
}
if
(
changed
)
$input
.
prop
(
'
checked
'
,
!
this
.
$element
.
hasClass
(
'
active
'
)).
trigger
(
'
change
'
)
$input
.
prop
(
'
checked
'
,
this
.
$element
.
hasClass
(
'
active
'
))
if
(
changed
)
$input
.
trigger
(
'
change
'
)
}
else
{
this
.
$element
.
attr
(
'
aria-pressed
'
,
!
this
.
$element
.
hasClass
(
'
active
'
))
this
.
$element
.
toggleClass
(
'
active
'
)
}
if
(
changed
)
this
.
$element
.
toggleClass
(
'
active
'
)
}
...
...
@@ -280,7 +284,7 @@ if (typeof jQuery === 'undefined') {
var
$btn
=
$
(
e
.
target
)
if
(
!
$btn
.
hasClass
(
'
btn
'
))
$btn
=
$btn
.
closest
(
'
.btn
'
)
Plugin
.
call
(
$btn
,
'
toggle
'
)
if
(
!
$
(
e
.
target
).
is
(
'
input[type="radio"]
'
))
e
.
preventDefault
()
if
(
!
(
$
(
e
.
target
).
is
(
'
input[type="radio"]
'
)
||
$
(
e
.
target
).
is
(
'
input[type="checkbox"]
'
))
)
e
.
preventDefault
()
})
.
on
(
'
focus.bs.button.data-api blur.bs.button.data-api
'
,
'
[data-toggle^="button"]
'
,
function
(
e
)
{
$
(
e
.
target
).
closest
(
'
.btn
'
).
toggleClass
(
'
focus
'
,
/^focus
(
in
)?
$/
.
test
(
e
.
type
))
...
...
@@ -1265,6 +1269,7 @@ if (typeof jQuery === 'undefined') {
this
.
timeout
=
null
this
.
hoverState
=
null
this
.
$element
=
null
this
.
inState
=
null
this
.
init
(
'
tooltip
'
,
element
,
options
)
}
...
...
@@ -1295,6 +1300,7 @@ if (typeof jQuery === 'undefined') {
this
.
$element
=
$
(
element
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
$viewport
=
this
.
options
.
viewport
&&
$
(
$
.
isFunction
(
this
.
options
.
viewport
)
?
this
.
options
.
viewport
.
call
(
this
,
this
.
$element
)
:
(
this
.
options
.
viewport
.
selector
||
this
.
options
.
viewport
))
this
.
inState
=
{
click
:
false
,
hover
:
false
,
focus
:
false
}
if
(
this
.
$element
[
0
]
instanceof
document
.
constructor
&&
!
this
.
options
.
selector
)
{
throw
new
Error
(
'
`selector` option must be specified when initializing
'
+
this
.
type
+
'
on the window.document object!
'
)
...
...
@@ -1353,16 +1359,20 @@ if (typeof jQuery === 'undefined') {
var
self
=
obj
instanceof
this
.
constructor
?
obj
:
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
)
if
(
self
&&
self
.
$tip
&&
self
.
$tip
.
is
(
'
:visible
'
))
{
self
.
hoverState
=
'
in
'
return
}
if
(
!
self
)
{
self
=
new
this
.
constructor
(
obj
.
currentTarget
,
this
.
getDelegateOptions
())
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
,
self
)
}
if
(
obj
instanceof
$
.
Event
)
{
self
.
inState
[
obj
.
type
==
'
focusin
'
?
'
focus
'
:
'
hover
'
]
=
true
}
if
(
self
.
tip
().
hasClass
(
'
in
'
)
||
self
.
hoverState
==
'
in
'
)
{
self
.
hoverState
=
'
in
'
return
}
clearTimeout
(
self
.
timeout
)
self
.
hoverState
=
'
in
'
...
...
@@ -1374,6 +1384,14 @@ if (typeof jQuery === 'undefined') {
},
self
.
options
.
delay
.
show
)
}
Tooltip
.
prototype
.
isInStateTrue
=
function
()
{
for
(
var
key
in
this
.
inState
)
{
if
(
this
.
inState
[
key
])
return
true
}
return
false
}
Tooltip
.
prototype
.
leave
=
function
(
obj
)
{
var
self
=
obj
instanceof
this
.
constructor
?
obj
:
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
)
...
...
@@ -1383,6 +1401,12 @@ if (typeof jQuery === 'undefined') {
$
(
obj
.
currentTarget
).
data
(
'
bs.
'
+
this
.
type
,
self
)
}
if
(
obj
instanceof
$
.
Event
)
{
self
.
inState
[
obj
.
type
==
'
focusout
'
?
'
focus
'
:
'
hover
'
]
=
false
}
if
(
self
.
isInStateTrue
())
return
clearTimeout
(
self
.
timeout
)
self
.
hoverState
=
'
out
'
...
...
@@ -1682,7 +1706,13 @@ if (typeof jQuery === 'undefined') {
}
}
self
.
tip
().
hasClass
(
'
in
'
)
?
self
.
leave
(
self
)
:
self
.
enter
(
self
)
if
(
e
)
{
self
.
inState
.
click
=
!
self
.
inState
.
click
if
(
self
.
isInStateTrue
())
self
.
enter
(
self
)
else
self
.
leave
(
self
)
}
else
{
self
.
tip
().
hasClass
(
'
in
'
)
?
self
.
leave
(
self
)
:
self
.
enter
(
self
)
}
}
Tooltip
.
prototype
.
destroy
=
function
()
{
...
...
@@ -2249,7 +2279,7 @@ if (typeof jQuery === 'undefined') {
var
offset
=
this
.
options
.
offset
var
offsetTop
=
offset
.
top
var
offsetBottom
=
offset
.
bottom
var
scrollHeight
=
$
(
document
.
body
).
height
()
var
scrollHeight
=
Math
.
max
(
$
(
document
).
height
(),
$
(
document
.
body
).
height
()
)
if
(
typeof
offset
!=
'
object
'
)
offsetBottom
=
offsetTop
=
offset
if
(
typeof
offsetTop
==
'
function
'
)
offsetTop
=
offset
.
top
(
this
.
$element
)
...
...
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.min.js
+
2
-
3
View file @
414d0a53
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets