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
231744d6
Commit
231744d6
authored
10 years ago
by
Heinrich Fenkart
Browse files
Options
Download
Email Patches
Plain Diff
Expose transition durations on plugin constructors; closes
#13656
parent
a0d8d565
5 merge requests
!28721
Hot test
,
!14061
Expose transition durations on plugin constructors; closes #13656
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
js/alert.js
+3
-1
js/alert.js
js/carousel.js
+3
-1
js/carousel.js
js/collapse.js
+4
-2
js/collapse.js
js/modal.js
+7
-4
js/modal.js
js/tab.js
+3
-1
js/tab.js
js/tooltip.js
+4
-2
js/tooltip.js
with
24 additions
and
11 deletions
+24
-11
js/alert.js
+
3
-
1
View file @
231744d6
...
...
@@ -20,6 +20,8 @@
Alert
.
VERSION
=
'
3.2.0
'
Alert
.
TRANSITION_DURATION
=
150
Alert
.
prototype
.
close
=
function
(
e
)
{
var
$this
=
$
(
this
)
var
selector
=
$this
.
attr
(
'
data-target
'
)
...
...
@@ -51,7 +53,7 @@
$
.
support
.
transition
&&
$parent
.
hasClass
(
'
fade
'
)
?
$parent
.
one
(
'
bsTransitionEnd
'
,
removeElement
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
Alert
.
TRANSITION_DURATION
)
:
removeElement
()
}
...
...
This diff is collapsed.
Click to expand it.
js/carousel.js
+
3
-
1
View file @
231744d6
...
...
@@ -30,6 +30,8 @@
Carousel
.
VERSION
=
'
3.2.0
'
Carousel
.
TRANSITION_DURATION
=
600
Carousel
.
DEFAULTS
=
{
interval
:
5000
,
pause
:
'
hover
'
,
...
...
@@ -146,7 +148,7 @@
that
.
$element
.
trigger
(
slidEvent
)
},
0
)
})
.
emulateTransitionEnd
(
$active
.
css
(
'
transition-duration
'
).
slice
(
0
,
-
1
)
*
1000
)
.
emulateTransitionEnd
(
Carousel
.
TRANSITION_DURATION
)
}
else
{
$active
.
removeClass
(
'
active
'
)
$next
.
addClass
(
'
active
'
)
...
...
This diff is collapsed.
Click to expand it.
js/collapse.js
+
4
-
2
View file @
231744d6
...
...
@@ -24,6 +24,8 @@
Collapse
.
VERSION
=
'
3.2.0
'
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
DEFAULTS
=
{
toggle
:
true
}
...
...
@@ -72,7 +74,7 @@
this
.
$element
.
one
(
'
bsTransitionEnd
'
,
$
.
proxy
(
complete
,
this
))
.
emulateTransitionEnd
(
350
)[
dimension
](
this
.
$element
[
0
][
scrollSize
])
.
emulateTransitionEnd
(
Collapse
.
TRANSITION_DURATION
)[
dimension
](
this
.
$element
[
0
][
scrollSize
])
}
Collapse
.
prototype
.
hide
=
function
()
{
...
...
@@ -105,7 +107,7 @@
this
.
$element
[
dimension
](
0
)
.
one
(
'
bsTransitionEnd
'
,
$
.
proxy
(
complete
,
this
))
.
emulateTransitionEnd
(
350
)
.
emulateTransitionEnd
(
Collapse
.
TRANSITION_DURATION
)
}
Collapse
.
prototype
.
toggle
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
js/modal.js
+
7
-
4
View file @
231744d6
...
...
@@ -32,6 +32,9 @@
Modal
.
VERSION
=
'
3.2.0
'
Modal
.
TRANSITION_DURATION
=
300
Modal
.
BACKDROP_TRANSITION_DURATION
=
150
Modal
.
DEFAULTS
=
{
backdrop
:
true
,
keyboard
:
true
,
...
...
@@ -88,7 +91,7 @@
.
one
(
'
bsTransitionEnd
'
,
function
()
{
that
.
$element
.
trigger
(
'
focus
'
).
trigger
(
e
)
})
.
emulateTransitionEnd
(
300
)
:
.
emulateTransitionEnd
(
Modal
.
TRANSITION_DURATION
)
:
that
.
$element
.
trigger
(
'
focus
'
).
trigger
(
e
)
})
}
...
...
@@ -119,7 +122,7 @@
$
.
support
.
transition
&&
this
.
$element
.
hasClass
(
'
fade
'
)
?
this
.
$element
.
one
(
'
bsTransitionEnd
'
,
$
.
proxy
(
this
.
hideModal
,
this
))
.
emulateTransitionEnd
(
300
)
:
.
emulateTransitionEnd
(
Modal
.
TRANSITION_DURATION
)
:
this
.
hideModal
()
}
...
...
@@ -182,7 +185,7 @@
doAnimate
?
this
.
$backdrop
.
one
(
'
bsTransitionEnd
'
,
callback
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
Modal
.
BACKDROP_TRANSITION_DURATION
)
:
callback
()
}
else
if
(
!
this
.
isShown
&&
this
.
$backdrop
)
{
...
...
@@ -195,7 +198,7 @@
$
.
support
.
transition
&&
this
.
$element
.
hasClass
(
'
fade
'
)
?
this
.
$backdrop
.
one
(
'
bsTransitionEnd
'
,
callbackRemove
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
Modal
.
BACKDROP_TRANSITION_DURATION
)
:
callbackRemove
()
}
else
if
(
callback
)
{
...
...
This diff is collapsed.
Click to expand it.
js/tab.js
+
3
-
1
View file @
231744d6
...
...
@@ -19,6 +19,8 @@
Tab
.
VERSION
=
'
3.2.0
'
Tab
.
TRANSITION_DURATION
=
150
Tab
.
prototype
.
show
=
function
()
{
var
$this
=
this
.
element
var
$ul
=
$this
.
closest
(
'
ul:not(.dropdown-menu)
'
)
...
...
@@ -82,7 +84,7 @@
$active
.
length
&&
transition
?
$active
.
one
(
'
bsTransitionEnd
'
,
next
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
Tab
.
TRANSITION_DURATION
)
:
next
()
$active
.
removeClass
(
'
in
'
)
...
...
This diff is collapsed.
Click to expand it.
js/tooltip.js
+
4
-
2
View file @
231744d6
...
...
@@ -27,6 +27,8 @@
Tooltip
.
VERSION
=
'
3.2.0
'
Tooltip
.
TRANSITION_DURATION
=
150
Tooltip
.
DEFAULTS
=
{
animation
:
true
,
placement
:
'
top
'
,
...
...
@@ -207,7 +209,7 @@
$
.
support
.
transition
&&
this
.
$tip
.
hasClass
(
'
fade
'
)
?
$tip
.
one
(
'
bsTransitionEnd
'
,
complete
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
Tooltip
.
TRANSITION_DURATION
)
:
complete
()
}
}
...
...
@@ -295,7 +297,7 @@
$
.
support
.
transition
&&
this
.
$tip
.
hasClass
(
'
fade
'
)
?
$tip
.
one
(
'
bsTransitionEnd
'
,
complete
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
Tooltip
.
TRANSITION_DURATION
)
:
complete
()
this
.
hoverState
=
null
...
...
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