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
8cf04911
Commit
8cf04911
authored
Jul 17, 2013
by
fat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #7776
parent
451acb42
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
16 deletions
+41
-16
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.js
+13
-10
docs/assets/js/bootstrap.min.js
docs/assets/js/bootstrap.min.js
+1
-1
js/popover.js
js/popover.js
+6
-4
js/tests/unit/popover.js
js/tests/unit/popover.js
+20
-0
js/tests/unit/tooltip.js
js/tests/unit/tooltip.js
+1
-1
No files found.
docs/assets/js/bootstrap.js
View file @
8cf04911
...
...
@@ -804,7 +804,7 @@
var
Modal
=
function
(
element
,
options
)
{
this
.
options
=
options
this
.
$element
=
$
(
element
).
delegate
(
'
[data-dismiss="modal"]
'
,
'
click.dismiss.modal
'
,
$
.
proxy
(
this
.
hide
,
this
))
this
.
$element
=
$
(
element
).
on
(
'
click.dismiss.modal
'
,
'
[data-dismiss="modal"]
'
,
$
.
proxy
(
this
.
hide
,
this
))
this
.
$backdrop
=
this
.
isShown
=
null
...
...
@@ -939,11 +939,12 @@
this
.
$backdrop
=
$
(
'
<div class="modal-backdrop
'
+
animate
+
'
" />
'
)
.
appendTo
(
document
.
body
)
this
.
$backdrop
.
click
(
this
.
options
.
backdrop
==
'
static
'
?
$
.
proxy
(
this
.
$element
[
0
].
focus
,
this
.
$element
[
0
])
:
$
.
proxy
(
this
.
hide
,
this
)
)
this
.
$element
.
on
(
'
click
'
,
$
.
proxy
(
function
(
e
)
{
if
(
e
.
target
!==
e
.
currentTarget
)
return
this
.
options
.
backdrop
==
'
static
'
?
this
.
$element
[
0
].
focus
.
call
(
this
.
$element
[
0
])
:
this
.
hide
.
call
(
this
)
},
this
))
if
(
doAnimate
)
this
.
$backdrop
[
0
].
offsetWidth
// force reflow
...
...
@@ -1442,11 +1443,13 @@
}
Popover
.
prototype
.
getContent
=
function
()
{
var
content
=
typeof
this
.
options
.
content
==
'
function
'
?
this
.
options
.
content
.
call
(
this
.
$element
[
0
])
:
this
.
options
.
content
var
$e
=
this
.
$element
var
o
=
this
.
options
return
content
||
this
.
$element
.
attr
(
'
data-content
'
)
return
$e
.
attr
(
'
data-content
'
)
||
(
typeof
o
.
content
==
'
function
'
?
o
.
content
.
call
(
$e
[
0
])
:
o
.
content
)
}
Popover
.
prototype
.
tip
=
function
()
{
...
...
docs/assets/js/bootstrap.min.js
View file @
8cf04911
This diff is collapsed.
Click to expand it.
js/popover.js
View file @
8cf04911
...
...
@@ -64,11 +64,13 @@
}
Popover
.
prototype
.
getContent
=
function
()
{
var
content
=
typeof
this
.
options
.
content
==
'
function
'
?
this
.
options
.
content
.
call
(
this
.
$element
[
0
])
:
this
.
options
.
content
var
$e
=
this
.
$element
var
o
=
this
.
options
return
content
||
this
.
$element
.
attr
(
'
data-content
'
)
return
$e
.
attr
(
'
data-content
'
)
||
(
typeof
o
.
content
==
'
function
'
?
o
.
content
.
call
(
$e
[
0
])
:
o
.
content
)
}
Popover
.
prototype
.
tip
=
function
()
{
...
...
js/tests/unit/popover.js
View file @
8cf04911
...
...
@@ -77,6 +77,26 @@ $(function () {
$
(
'
#qunit-fixture
'
).
empty
()
})
test
(
"
should get title and content from attributes #2
"
,
function
()
{
$
.
support
.
transition
=
false
var
popover
=
$
(
'
<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
popover
({
title
:
'
ignored title option
'
,
content
:
'
ignored content option
'
})
.
popover
(
'
show
'
)
ok
(
$
(
'
.popover
'
).
length
,
'
popover was inserted
'
)
equals
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@mdo
'
,
'
title correctly inserted
'
)
equals
(
$
(
'
.popover .popover-content
'
).
text
(),
"
loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻
"
,
'
content correctly inserted
'
)
popover
.
popover
(
'
hide
'
)
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
$
(
'
#qunit-fixture
'
).
empty
()
})
test
(
"
should respect custom classes
"
,
function
()
{
$
.
support
.
transition
=
false
var
popover
=
$
(
'
<a href="#">@fat</a>
'
)
...
...
js/tests/unit/tooltip.js
View file @
8cf04911
...
...
@@ -296,7 +296,7 @@ $(function () {
$
(
"
head
"
).
append
(
'
<style> .tooltip.right { white-space: nowrap; } .tooltip.right .tooltip-inner { max-width: none; } </style>
'
)
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
,
target
=
$
(
'
<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line">
To my right
</a>
'
)
,
target
=
$
(
'
<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"></a>
'
)
.
appendTo
(
container
)
.
tooltip
({
placement
:
'
right
'
})
.
tooltip
(
'
show
'
)
...
...
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