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
bc1ce426
Commit
bc1ce426
authored
10 years ago
by
Chris Rebert
Browse files
Options
Download
Plain Diff
Merge pull request #13593 from ResentedHook/master
Add tooltip self-reference to address
#12320
parents
ef622549
122c05db
4 merge requests
!28721
Hot test
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/tests/unit/popover.js
+10
-0
js/tests/unit/popover.js
js/tests/unit/tooltip.js
+11
-0
js/tests/unit/tooltip.js
js/tooltip.js
+1
-0
js/tooltip.js
with
22 additions
and
0 deletions
+22
-0
js/tests/unit/popover.js
+
10
-
0
View file @
bc1ce426
...
...
@@ -46,6 +46,16 @@ $(function () {
ok
(
!!
popover
.
data
(
'
bs.popover
'
),
'
popover instance exists
'
)
})
test
(
'
should store popover trigger in popover instance data object
'
,
function
()
{
$
.
support
.
transition
=
false
var
popover
=
$
(
'
<a href="#" title="ResentedHook">@ResentedHook</a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
bootstrapPopover
()
popover
.
bootstrapPopover
(
'
show
'
)
ok
(
!!
$
(
'
.popover
'
).
data
(
'
bs.popover
'
),
'
popover trigger stored in instance data
'
)
$
(
'
#qunit-fixture
'
).
empty
()
})
test
(
'
should get title and content from options
'
,
function
()
{
$
.
support
.
transition
=
false
var
popover
=
$
(
'
<a href="#">@fat</a>
'
)
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/tooltip.js
+
11
-
0
View file @
bc1ce426
...
...
@@ -325,6 +325,17 @@ $(function () {
ok
(
$
(
'
.tooltip
'
).
is
(
'
.fade.in
'
),
'
tooltip should be toggled in
'
)
})
test
(
'
should hide shown tooltip when toggle is called on tooltip
'
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="tooltip on toggle">@ResentedHook</a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
bootstrapTooltip
({
trigger
:
'
manual
'
})
.
bootstrapTooltip
(
'
toggle
'
)
$
(
'
.tooltip
'
,
'
#qunit-fixture
'
).
bootstrapTooltip
(
'
toggle
'
)
ok
(
$
(
'
.tooltip
'
).
not
(
'
.fade.in
'
),
'
tooltip should be toggled out
'
)
tooltip
.
bootstrapTooltip
(
'
hide
'
)
$
(
'
#qunit-fixture
'
).
empty
()
})
test
(
'
should place tooltips inside the body
'
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
...
...
This diff is collapsed.
Click to expand it.
js/tooltip.js
+
1
-
0
View file @
bc1ce426
...
...
@@ -170,6 +170,7 @@
.
detach
()
.
css
({
top
:
0
,
left
:
0
,
display
:
'
block
'
})
.
addClass
(
placement
)
.
data
(
'
bs.
'
+
this
.
type
,
this
)
this
.
options
.
container
?
$tip
.
appendTo
(
this
.
options
.
container
)
:
$tip
.
insertAfter
(
this
.
$element
)
...
...
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