Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
bootstrap
Commits
db90ff6d
Commit
db90ff6d
authored
Nov 05, 2014
by
Heinrich Fenkart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grunt
parent
72ad89b0
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
22 deletions
+72
-22
dist/js/bootstrap.js
dist/js/bootstrap.js
+33
-8
dist/js/bootstrap.min.js
dist/js/bootstrap.min.js
+2
-2
docs/assets/js/customize.min.js
docs/assets/js/customize.min.js
+1
-1
docs/assets/js/raw-files.min.js
docs/assets/js/raw-files.min.js
+1
-1
docs/dist/js/bootstrap.js
docs/dist/js/bootstrap.js
+33
-8
docs/dist/js/bootstrap.min.js
docs/dist/js/bootstrap.min.js
+2
-2
No files found.
dist/js/bootstrap.js
View file @
db90ff6d
...
@@ -959,11 +959,11 @@ if (typeof jQuery === 'undefined') {
...
@@ -959,11 +959,11 @@ if (typeof jQuery === 'undefined') {
this
.
isShown
=
true
this
.
isShown
=
true
this
.
checkScrollbar
()
this
.
checkScrollbar
()
this
.
setScrollbar
()
this
.
$body
.
addClass
(
'
modal-open
'
)
this
.
$body
.
addClass
(
'
modal-open
'
)
this
.
setScrollbar
()
this
.
escape
()
this
.
escape
()
if
(
this
.
options
.
backdrop
)
this
.
resize
()
this
.
resize
()
this
.
$element
.
on
(
'
click.dismiss.bs.modal
'
,
'
[data-dismiss="modal"]
'
,
$
.
proxy
(
this
.
hide
,
this
))
this
.
$element
.
on
(
'
click.dismiss.bs.modal
'
,
'
[data-dismiss="modal"]
'
,
$
.
proxy
(
this
.
hide
,
this
))
...
@@ -978,7 +978,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -978,7 +978,8 @@ if (typeof jQuery === 'undefined') {
.
show
()
.
show
()
.
scrollTop
(
0
)
.
scrollTop
(
0
)
if
(
that
.
options
.
backdrop
)
that
.
setBackdropHeight
()
if
(
that
.
options
.
backdrop
)
that
.
adjustBackdrop
()
that
.
adjustDialog
()
if
(
transition
)
{
if
(
transition
)
{
that
.
$element
[
0
].
offsetWidth
// force reflow
that
.
$element
[
0
].
offsetWidth
// force reflow
...
@@ -1014,7 +1015,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1014,7 +1015,7 @@ if (typeof jQuery === 'undefined') {
this
.
isShown
=
false
this
.
isShown
=
false
this
.
escape
()
this
.
escape
()
if
(
this
.
options
.
backdrop
)
this
.
resize
()
this
.
resize
()
$
(
document
).
off
(
'
focusin.bs.modal
'
)
$
(
document
).
off
(
'
focusin.bs.modal
'
)
...
@@ -1052,7 +1053,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1052,7 +1053,7 @@ if (typeof jQuery === 'undefined') {
Modal
.
prototype
.
resize
=
function
()
{
Modal
.
prototype
.
resize
=
function
()
{
if
(
this
.
isShown
)
{
if
(
this
.
isShown
)
{
$
(
window
).
on
(
'
resize.bs.modal
'
,
$
.
proxy
(
this
.
setBackdropHeight
,
this
))
$
(
window
).
on
(
'
resize.bs.modal
'
,
$
.
proxy
(
this
.
handleUpdate
,
this
))
}
else
{
}
else
{
$
(
window
).
off
(
'
resize.bs.modal
'
)
$
(
window
).
off
(
'
resize.bs.modal
'
)
}
}
...
@@ -1063,6 +1064,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1063,6 +1064,7 @@ if (typeof jQuery === 'undefined') {
this
.
$element
.
hide
()
this
.
$element
.
hide
()
this
.
backdrop
(
function
()
{
this
.
backdrop
(
function
()
{
that
.
$body
.
removeClass
(
'
modal-open
'
)
that
.
$body
.
removeClass
(
'
modal-open
'
)
that
.
resetAdjustments
()
that
.
resetScrollbar
()
that
.
resetScrollbar
()
that
.
$element
.
trigger
(
'
hidden.bs.modal
'
)
that
.
$element
.
trigger
(
'
hidden.bs.modal
'
)
})
})
...
@@ -1119,19 +1121,43 @@ if (typeof jQuery === 'undefined') {
...
@@ -1119,19 +1121,43 @@ if (typeof jQuery === 'undefined') {
}
}
}
}
Modal
.
prototype
.
setBackdropHeight
=
function
()
{
// these following methods are used to handle overflowing modals
Modal
.
prototype
.
handleUpdate
=
function
()
{
if
(
this
.
options
.
backdrop
)
this
.
adjustBackdrop
()
this
.
adjustDialog
()
}
Modal
.
prototype
.
adjustBackdrop
=
function
()
{
this
.
$backdrop
this
.
$backdrop
.
css
(
'
height
'
,
0
)
.
css
(
'
height
'
,
0
)
.
css
(
'
height
'
,
this
.
$element
[
0
].
scrollHeight
)
.
css
(
'
height
'
,
this
.
$element
[
0
].
scrollHeight
)
}
}
Modal
.
prototype
.
adjustDialog
=
function
()
{
var
modalIsOverflowing
=
this
.
$element
[
0
].
scrollHeight
>
document
.
documentElement
.
clientHeight
this
.
$element
.
css
({
paddingLeft
:
!
this
.
bodyIsOverflowing
&&
modalIsOverflowing
?
this
.
scrollbarWidth
:
''
,
paddingRight
:
this
.
bodyIsOverflowing
&&
!
modalIsOverflowing
?
this
.
scrollbarWidth
:
''
})
}
Modal
.
prototype
.
resetAdjustments
=
function
()
{
this
.
$element
.
css
({
paddingLeft
:
''
,
paddingRight
:
''
})
}
Modal
.
prototype
.
checkScrollbar
=
function
()
{
Modal
.
prototype
.
checkScrollbar
=
function
()
{
this
.
bodyIsOverflowing
=
document
.
body
.
scrollHeight
>
document
.
documentElement
.
clientHeight
this
.
scrollbarWidth
=
this
.
measureScrollbar
()
this
.
scrollbarWidth
=
this
.
measureScrollbar
()
}
}
Modal
.
prototype
.
setScrollbar
=
function
()
{
Modal
.
prototype
.
setScrollbar
=
function
()
{
var
bodyPad
=
parseInt
((
this
.
$body
.
css
(
'
padding-right
'
)
||
0
),
10
)
var
bodyPad
=
parseInt
((
this
.
$body
.
css
(
'
padding-right
'
)
||
0
),
10
)
if
(
this
.
scrollbarWidth
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
this
.
scrollbarWidth
)
if
(
this
.
bodyIsOverflowing
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
this
.
scrollbarWidth
)
}
}
Modal
.
prototype
.
resetScrollbar
=
function
()
{
Modal
.
prototype
.
resetScrollbar
=
function
()
{
...
@@ -1139,7 +1165,6 @@ if (typeof jQuery === 'undefined') {
...
@@ -1139,7 +1165,6 @@ if (typeof jQuery === 'undefined') {
}
}
Modal
.
prototype
.
measureScrollbar
=
function
()
{
// thx walsh
Modal
.
prototype
.
measureScrollbar
=
function
()
{
// thx walsh
if
(
document
.
body
.
clientWidth
>=
window
.
innerWidth
)
return
0
var
scrollDiv
=
document
.
createElement
(
'
div
'
)
var
scrollDiv
=
document
.
createElement
(
'
div
'
)
scrollDiv
.
className
=
'
modal-scrollbar-measure
'
scrollDiv
.
className
=
'
modal-scrollbar-measure
'
this
.
$body
.
append
(
scrollDiv
)
this
.
$body
.
append
(
scrollDiv
)
...
...
dist/js/bootstrap.min.js
View file @
db90ff6d
This diff is collapsed.
Click to expand it.
docs/assets/js/customize.min.js
View file @
db90ff6d
This diff is collapsed.
Click to expand it.
docs/assets/js/raw-files.min.js
View file @
db90ff6d
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.js
View file @
db90ff6d
...
@@ -959,11 +959,11 @@ if (typeof jQuery === 'undefined') {
...
@@ -959,11 +959,11 @@ if (typeof jQuery === 'undefined') {
this
.
isShown
=
true
this
.
isShown
=
true
this
.
checkScrollbar
()
this
.
checkScrollbar
()
this
.
setScrollbar
()
this
.
$body
.
addClass
(
'
modal-open
'
)
this
.
$body
.
addClass
(
'
modal-open
'
)
this
.
setScrollbar
()
this
.
escape
()
this
.
escape
()
if
(
this
.
options
.
backdrop
)
this
.
resize
()
this
.
resize
()
this
.
$element
.
on
(
'
click.dismiss.bs.modal
'
,
'
[data-dismiss="modal"]
'
,
$
.
proxy
(
this
.
hide
,
this
))
this
.
$element
.
on
(
'
click.dismiss.bs.modal
'
,
'
[data-dismiss="modal"]
'
,
$
.
proxy
(
this
.
hide
,
this
))
...
@@ -978,7 +978,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -978,7 +978,8 @@ if (typeof jQuery === 'undefined') {
.
show
()
.
show
()
.
scrollTop
(
0
)
.
scrollTop
(
0
)
if
(
that
.
options
.
backdrop
)
that
.
setBackdropHeight
()
if
(
that
.
options
.
backdrop
)
that
.
adjustBackdrop
()
that
.
adjustDialog
()
if
(
transition
)
{
if
(
transition
)
{
that
.
$element
[
0
].
offsetWidth
// force reflow
that
.
$element
[
0
].
offsetWidth
// force reflow
...
@@ -1014,7 +1015,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1014,7 +1015,7 @@ if (typeof jQuery === 'undefined') {
this
.
isShown
=
false
this
.
isShown
=
false
this
.
escape
()
this
.
escape
()
if
(
this
.
options
.
backdrop
)
this
.
resize
()
this
.
resize
()
$
(
document
).
off
(
'
focusin.bs.modal
'
)
$
(
document
).
off
(
'
focusin.bs.modal
'
)
...
@@ -1052,7 +1053,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1052,7 +1053,7 @@ if (typeof jQuery === 'undefined') {
Modal
.
prototype
.
resize
=
function
()
{
Modal
.
prototype
.
resize
=
function
()
{
if
(
this
.
isShown
)
{
if
(
this
.
isShown
)
{
$
(
window
).
on
(
'
resize.bs.modal
'
,
$
.
proxy
(
this
.
setBackdropHeight
,
this
))
$
(
window
).
on
(
'
resize.bs.modal
'
,
$
.
proxy
(
this
.
handleUpdate
,
this
))
}
else
{
}
else
{
$
(
window
).
off
(
'
resize.bs.modal
'
)
$
(
window
).
off
(
'
resize.bs.modal
'
)
}
}
...
@@ -1063,6 +1064,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1063,6 +1064,7 @@ if (typeof jQuery === 'undefined') {
this
.
$element
.
hide
()
this
.
$element
.
hide
()
this
.
backdrop
(
function
()
{
this
.
backdrop
(
function
()
{
that
.
$body
.
removeClass
(
'
modal-open
'
)
that
.
$body
.
removeClass
(
'
modal-open
'
)
that
.
resetAdjustments
()
that
.
resetScrollbar
()
that
.
resetScrollbar
()
that
.
$element
.
trigger
(
'
hidden.bs.modal
'
)
that
.
$element
.
trigger
(
'
hidden.bs.modal
'
)
})
})
...
@@ -1119,19 +1121,43 @@ if (typeof jQuery === 'undefined') {
...
@@ -1119,19 +1121,43 @@ if (typeof jQuery === 'undefined') {
}
}
}
}
Modal
.
prototype
.
setBackdropHeight
=
function
()
{
// these following methods are used to handle overflowing modals
Modal
.
prototype
.
handleUpdate
=
function
()
{
if
(
this
.
options
.
backdrop
)
this
.
adjustBackdrop
()
this
.
adjustDialog
()
}
Modal
.
prototype
.
adjustBackdrop
=
function
()
{
this
.
$backdrop
this
.
$backdrop
.
css
(
'
height
'
,
0
)
.
css
(
'
height
'
,
0
)
.
css
(
'
height
'
,
this
.
$element
[
0
].
scrollHeight
)
.
css
(
'
height
'
,
this
.
$element
[
0
].
scrollHeight
)
}
}
Modal
.
prototype
.
adjustDialog
=
function
()
{
var
modalIsOverflowing
=
this
.
$element
[
0
].
scrollHeight
>
document
.
documentElement
.
clientHeight
this
.
$element
.
css
({
paddingLeft
:
!
this
.
bodyIsOverflowing
&&
modalIsOverflowing
?
this
.
scrollbarWidth
:
''
,
paddingRight
:
this
.
bodyIsOverflowing
&&
!
modalIsOverflowing
?
this
.
scrollbarWidth
:
''
})
}
Modal
.
prototype
.
resetAdjustments
=
function
()
{
this
.
$element
.
css
({
paddingLeft
:
''
,
paddingRight
:
''
})
}
Modal
.
prototype
.
checkScrollbar
=
function
()
{
Modal
.
prototype
.
checkScrollbar
=
function
()
{
this
.
bodyIsOverflowing
=
document
.
body
.
scrollHeight
>
document
.
documentElement
.
clientHeight
this
.
scrollbarWidth
=
this
.
measureScrollbar
()
this
.
scrollbarWidth
=
this
.
measureScrollbar
()
}
}
Modal
.
prototype
.
setScrollbar
=
function
()
{
Modal
.
prototype
.
setScrollbar
=
function
()
{
var
bodyPad
=
parseInt
((
this
.
$body
.
css
(
'
padding-right
'
)
||
0
),
10
)
var
bodyPad
=
parseInt
((
this
.
$body
.
css
(
'
padding-right
'
)
||
0
),
10
)
if
(
this
.
scrollbarWidth
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
this
.
scrollbarWidth
)
if
(
this
.
bodyIsOverflowing
)
this
.
$body
.
css
(
'
padding-right
'
,
bodyPad
+
this
.
scrollbarWidth
)
}
}
Modal
.
prototype
.
resetScrollbar
=
function
()
{
Modal
.
prototype
.
resetScrollbar
=
function
()
{
...
@@ -1139,7 +1165,6 @@ if (typeof jQuery === 'undefined') {
...
@@ -1139,7 +1165,6 @@ if (typeof jQuery === 'undefined') {
}
}
Modal
.
prototype
.
measureScrollbar
=
function
()
{
// thx walsh
Modal
.
prototype
.
measureScrollbar
=
function
()
{
// thx walsh
if
(
document
.
body
.
clientWidth
>=
window
.
innerWidth
)
return
0
var
scrollDiv
=
document
.
createElement
(
'
div
'
)
var
scrollDiv
=
document
.
createElement
(
'
div
'
)
scrollDiv
.
className
=
'
modal-scrollbar-measure
'
scrollDiv
.
className
=
'
modal-scrollbar-measure
'
this
.
$body
.
append
(
scrollDiv
)
this
.
$body
.
append
(
scrollDiv
)
...
...
docs/dist/js/bootstrap.min.js
View file @
db90ff6d
This diff is collapsed.
Click to expand it.
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