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
dbed9da7
Commit
dbed9da7
authored
Aug 09, 2013
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #6159
parent
e46708f7
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
23 deletions
+27
-23
dist/js/bootstrap.js
dist/js/bootstrap.js
+13
-11
dist/js/bootstrap.min.js
dist/js/bootstrap.min.js
+1
-1
js/modal.js
js/modal.js
+13
-11
No files found.
dist/js/bootstrap.js
View file @
dbed9da7
...
@@ -860,13 +860,13 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
...
@@ -860,13 +860,13 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
,
show
:
true
,
show
:
true
}
}
Modal
.
prototype
.
toggle
=
function
()
{
Modal
.
prototype
.
toggle
=
function
(
_relatedTarget
)
{
return
this
[
!
this
.
isShown
?
'
show
'
:
'
hide
'
]()
return
this
[
!
this
.
isShown
?
'
show
'
:
'
hide
'
](
_relatedTarget
)
}
}
Modal
.
prototype
.
show
=
function
()
{
Modal
.
prototype
.
show
=
function
(
_relatedTarget
)
{
var
that
=
this
var
that
=
this
var
e
=
$
.
Event
(
'
show.bs.modal
'
)
var
e
=
$
.
Event
(
'
show.bs.modal
'
,
{
relatedTarget
:
_relatedTarget
}
)
this
.
$element
.
trigger
(
e
)
this
.
$element
.
trigger
(
e
)
...
@@ -895,13 +895,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
...
@@ -895,13 +895,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
that
.
enforceFocus
()
that
.
enforceFocus
()
var
e
=
$
.
Event
(
'
shown.bs.modal
'
,
{
relatedTarget
:
_relatedTarget
})
transition
?
transition
?
that
.
$element
that
.
$element
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
that
.
$element
.
focus
().
trigger
(
'
shown.bs.modal
'
)
that
.
$element
.
focus
().
trigger
(
e
)
})
})
.
emulateTransitionEnd
(
300
)
:
.
emulateTransitionEnd
(
300
)
:
that
.
$element
.
focus
().
trigger
(
'
shown.bs.modal
'
)
that
.
$element
.
focus
().
trigger
(
e
)
})
})
}
}
...
@@ -1014,15 +1016,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
...
@@ -1014,15 +1016,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
var
old
=
$
.
fn
.
modal
var
old
=
$
.
fn
.
modal
$
.
fn
.
modal
=
function
(
option
)
{
$
.
fn
.
modal
=
function
(
option
,
_relatedTarget
)
{
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
bs.modal
'
)
var
data
=
$this
.
data
(
'
bs.modal
'
)
var
options
=
$
.
extend
({},
Modal
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
var
options
=
$
.
extend
({},
Modal
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
)
$this
.
data
(
'
bs.modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
bs.modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
if
(
typeof
option
==
'
string
'
)
data
[
option
](
_relatedTarget
)
else
if
(
options
.
show
)
data
.
show
()
else
if
(
options
.
show
)
data
.
show
(
_relatedTarget
)
})
})
}
}
...
@@ -1045,12 +1047,12 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
...
@@ -1045,12 +1047,12 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
href
=
$this
.
attr
(
'
href
'
)
var
href
=
$this
.
attr
(
'
href
'
)
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
var
option
=
$target
.
data
(
'
modal
'
)
?
'
toggle
'
:
$
.
extend
({
remote
:
!
/#/
.
test
(
href
)
&&
href
},
$target
.
data
(),
$this
.
data
())
var
option
=
$target
.
data
(
'
modal
'
)
?
'
toggle
'
:
$
.
extend
({
remote
:
!
/#/
.
test
(
href
)
&&
href
},
$target
.
data
(),
$this
.
data
())
e
.
preventDefault
()
e
.
preventDefault
()
$target
$target
.
modal
(
option
)
.
modal
(
option
,
this
)
.
one
(
'
hide
'
,
function
()
{
.
one
(
'
hide
'
,
function
()
{
$this
.
is
(
'
:visible
'
)
&&
$this
.
focus
()
$this
.
is
(
'
:visible
'
)
&&
$this
.
focus
()
})
})
...
...
dist/js/bootstrap.min.js
View file @
dbed9da7
This diff is collapsed.
Click to expand it.
js/modal.js
View file @
dbed9da7
...
@@ -38,13 +38,13 @@
...
@@ -38,13 +38,13 @@
,
show
:
true
,
show
:
true
}
}
Modal
.
prototype
.
toggle
=
function
()
{
Modal
.
prototype
.
toggle
=
function
(
_relatedTarget
)
{
return
this
[
!
this
.
isShown
?
'
show
'
:
'
hide
'
]()
return
this
[
!
this
.
isShown
?
'
show
'
:
'
hide
'
](
_relatedTarget
)
}
}
Modal
.
prototype
.
show
=
function
()
{
Modal
.
prototype
.
show
=
function
(
_relatedTarget
)
{
var
that
=
this
var
that
=
this
var
e
=
$
.
Event
(
'
show.bs.modal
'
)
var
e
=
$
.
Event
(
'
show.bs.modal
'
,
{
relatedTarget
:
_relatedTarget
}
)
this
.
$element
.
trigger
(
e
)
this
.
$element
.
trigger
(
e
)
...
@@ -73,13 +73,15 @@
...
@@ -73,13 +73,15 @@
that
.
enforceFocus
()
that
.
enforceFocus
()
var
e
=
$
.
Event
(
'
shown.bs.modal
'
,
{
relatedTarget
:
_relatedTarget
})
transition
?
transition
?
that
.
$element
that
.
$element
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
that
.
$element
.
focus
().
trigger
(
'
shown.bs.modal
'
)
that
.
$element
.
focus
().
trigger
(
e
)
})
})
.
emulateTransitionEnd
(
300
)
:
.
emulateTransitionEnd
(
300
)
:
that
.
$element
.
focus
().
trigger
(
'
shown.bs.modal
'
)
that
.
$element
.
focus
().
trigger
(
e
)
})
})
}
}
...
@@ -192,15 +194,15 @@
...
@@ -192,15 +194,15 @@
var
old
=
$
.
fn
.
modal
var
old
=
$
.
fn
.
modal
$
.
fn
.
modal
=
function
(
option
)
{
$
.
fn
.
modal
=
function
(
option
,
_relatedTarget
)
{
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
bs.modal
'
)
var
data
=
$this
.
data
(
'
bs.modal
'
)
var
options
=
$
.
extend
({},
Modal
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
var
options
=
$
.
extend
({},
Modal
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
)
$this
.
data
(
'
bs.modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
bs.modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
if
(
typeof
option
==
'
string
'
)
data
[
option
](
_relatedTarget
)
else
if
(
options
.
show
)
data
.
show
()
else
if
(
options
.
show
)
data
.
show
(
_relatedTarget
)
})
})
}
}
...
@@ -223,12 +225,12 @@
...
@@ -223,12 +225,12 @@
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
href
=
$this
.
attr
(
'
href
'
)
var
href
=
$this
.
attr
(
'
href
'
)
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
var
option
=
$target
.
data
(
'
modal
'
)
?
'
toggle
'
:
$
.
extend
({
remote
:
!
/#/
.
test
(
href
)
&&
href
},
$target
.
data
(),
$this
.
data
())
var
option
=
$target
.
data
(
'
modal
'
)
?
'
toggle
'
:
$
.
extend
({
remote
:
!
/#/
.
test
(
href
)
&&
href
},
$target
.
data
(),
$this
.
data
())
e
.
preventDefault
()
e
.
preventDefault
()
$target
$target
.
modal
(
option
)
.
modal
(
option
,
this
)
.
one
(
'
hide
'
,
function
()
{
.
one
(
'
hide
'
,
function
()
{
$this
.
is
(
'
:visible
'
)
&&
$this
.
focus
()
$this
.
is
(
'
:visible
'
)
&&
$this
.
focus
()
})
})
...
...
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