File tree 6 files changed +24
-11
lines changed
6 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 20
20
21
21
Alert . VERSION = '3.2.0'
22
22
23
+ Alert . TRANSITION_DURATION = 150
24
+
23
25
Alert . prototype . close = function ( e ) {
24
26
var $this = $ ( this )
25
27
var selector = $this . attr ( 'data-target' )
51
53
$ . support . transition && $parent . hasClass ( 'fade' ) ?
52
54
$parent
53
55
. one ( 'bsTransitionEnd' , removeElement )
54
- . emulateTransitionEnd ( 150 ) :
56
+ . emulateTransitionEnd ( Alert . TRANSITION_DURATION ) :
55
57
removeElement ( )
56
58
}
57
59
Original file line number Diff line number Diff line change 30
30
31
31
Carousel . VERSION = '3.2.0'
32
32
33
+ Carousel . TRANSITION_DURATION = 600
34
+
33
35
Carousel . DEFAULTS = {
34
36
interval : 5000 ,
35
37
pause : 'hover' ,
153
155
that . $element . trigger ( slidEvent )
154
156
} , 0 )
155
157
} )
156
- . emulateTransitionEnd ( $active . css ( 'transition-duration' ) . slice ( 0 , - 1 ) * 1000 )
158
+ . emulateTransitionEnd ( Carousel . TRANSITION_DURATION )
157
159
} else {
158
160
$active . removeClass ( 'active' )
159
161
$next . addClass ( 'active' )
Original file line number Diff line number Diff line change 24
24
25
25
Collapse . VERSION = '3.2.0'
26
26
27
+ Collapse . TRANSITION_DURATION = 350
28
+
27
29
Collapse . DEFAULTS = {
28
30
toggle : true
29
31
}
72
74
73
75
this . $element
74
76
. one ( 'bsTransitionEnd' , $ . proxy ( complete , this ) )
75
- . emulateTransitionEnd ( 350 ) [ dimension ] ( this . $element [ 0 ] [ scrollSize ] )
77
+ . emulateTransitionEnd ( Collapse . TRANSITION_DURATION ) [ dimension ] ( this . $element [ 0 ] [ scrollSize ] )
76
78
}
77
79
78
80
Collapse . prototype . hide = function ( ) {
105
107
this . $element
106
108
[ dimension ] ( 0 )
107
109
. one ( 'bsTransitionEnd' , $ . proxy ( complete , this ) )
108
- . emulateTransitionEnd ( 350 )
110
+ . emulateTransitionEnd ( Collapse . TRANSITION_DURATION )
109
111
}
110
112
111
113
Collapse . prototype . toggle = function ( ) {
Original file line number Diff line number Diff line change 32
32
33
33
Modal . VERSION = '3.2.0'
34
34
35
+ Modal . TRANSITION_DURATION = 300
36
+ Modal . BACKDROP_TRANSITION_DURATION = 150
37
+
35
38
Modal . DEFAULTS = {
36
39
backdrop : true ,
37
40
keyboard : true ,
88
91
. one ( 'bsTransitionEnd' , function ( ) {
89
92
that . $element . trigger ( 'focus' ) . trigger ( e )
90
93
} )
91
- . emulateTransitionEnd ( 300 ) :
94
+ . emulateTransitionEnd ( Modal . TRANSITION_DURATION ) :
92
95
that . $element . trigger ( 'focus' ) . trigger ( e )
93
96
} )
94
97
}
119
122
$ . support . transition && this . $element . hasClass ( 'fade' ) ?
120
123
this . $element
121
124
. one ( 'bsTransitionEnd' , $ . proxy ( this . hideModal , this ) )
122
- . emulateTransitionEnd ( 300 ) :
125
+ . emulateTransitionEnd ( Modal . TRANSITION_DURATION ) :
123
126
this . hideModal ( )
124
127
}
125
128
182
185
doAnimate ?
183
186
this . $backdrop
184
187
. one ( 'bsTransitionEnd' , callback )
185
- . emulateTransitionEnd ( 150 ) :
188
+ . emulateTransitionEnd ( Modal . BACKDROP_TRANSITION_DURATION ) :
186
189
callback ( )
187
190
188
191
} else if ( ! this . isShown && this . $backdrop ) {
195
198
$ . support . transition && this . $element . hasClass ( 'fade' ) ?
196
199
this . $backdrop
197
200
. one ( 'bsTransitionEnd' , callbackRemove )
198
- . emulateTransitionEnd ( 150 ) :
201
+ . emulateTransitionEnd ( Modal . BACKDROP_TRANSITION_DURATION ) :
199
202
callbackRemove ( )
200
203
201
204
} else if ( callback ) {
Original file line number Diff line number Diff line change 19
19
20
20
Tab . VERSION = '3.2.0'
21
21
22
+ Tab . TRANSITION_DURATION = 150
23
+
22
24
Tab . prototype . show = function ( ) {
23
25
var $this = this . element
24
26
var $ul = $this . closest ( 'ul:not(.dropdown-menu)' )
82
84
$active . length && transition ?
83
85
$active
84
86
. one ( 'bsTransitionEnd' , next )
85
- . emulateTransitionEnd ( 150 ) :
87
+ . emulateTransitionEnd ( Tab . TRANSITION_DURATION ) :
86
88
next ( )
87
89
88
90
$active . removeClass ( 'in' )
Original file line number Diff line number Diff line change 27
27
28
28
Tooltip . VERSION = '3.2.0'
29
29
30
+ Tooltip . TRANSITION_DURATION = 150
31
+
30
32
Tooltip . DEFAULTS = {
31
33
animation : true ,
32
34
placement : 'top' ,
207
209
$ . support . transition && this . $tip . hasClass ( 'fade' ) ?
208
210
$tip
209
211
. one ( 'bsTransitionEnd' , complete )
210
- . emulateTransitionEnd ( 150 ) :
212
+ . emulateTransitionEnd ( Tooltip . TRANSITION_DURATION ) :
211
213
complete ( )
212
214
}
213
215
}
295
297
$ . support . transition && this . $tip . hasClass ( 'fade' ) ?
296
298
$tip
297
299
. one ( 'bsTransitionEnd' , complete )
298
- . emulateTransitionEnd ( 150 ) :
300
+ . emulateTransitionEnd ( Tooltip . TRANSITION_DURATION ) :
299
301
complete ( )
300
302
301
303
this . hoverState = null
You can’t perform that action at this time.
0 commit comments