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
a6eb972b
Commit
a6eb972b
authored
Jan 22, 2012
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1101 from ansman/2.0-wip
Fix for #1102 and #1100
parents
88596797
4882e6da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
js/bootstrap-popover.js
js/bootstrap-popover.js
+2
-2
js/tests/unit/bootstrap-popover.js
js/tests/unit/bootstrap-popover.js
+19
-0
No files found.
js/bootstrap-popover.js
View file @
a6eb972b
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
$tip
.
find
(
'
.title
'
)[
$
.
type
(
title
)
==
'
object
'
?
'
append
'
:
'
html
'
](
title
)
$tip
.
find
(
'
.title
'
)[
$
.
type
(
title
)
==
'
object
'
?
'
append
'
:
'
html
'
](
title
)
$tip
.
find
(
'
.content > *
'
)[
$
.
type
(
content
)
==
'
object
'
?
'
append
'
:
'
html
'
](
content
)
$tip
.
find
(
'
.content > *
'
)[
$
.
type
(
content
)
==
'
object
'
?
'
append
'
:
'
html
'
](
content
)
$tip
[
0
].
className
=
'
popover
'
$tip
.
removeClass
(
'
fade top bottom left right in
'
)
}
}
,
hasContent
:
function
()
{
,
hasContent
:
function
()
{
...
@@ -92,4 +92,4 @@
...
@@ -92,4 +92,4 @@
,
template
:
'
<div class="popover"><div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div></div>
'
,
template
:
'
<div class="popover"><div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div></div>
'
})
})
}(
window
.
jQuery
)
}(
window
.
jQuery
)
\ No newline at end of file
js/tests/unit/bootstrap-popover.js
View file @
a6eb972b
...
@@ -70,5 +70,24 @@ $(function () {
...
@@ -70,5 +70,24 @@ $(function () {
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
$
(
'
#qunit-fixture
'
).
empty
()
$
(
'
#qunit-fixture
'
).
empty
()
})
})
test
(
"
should respect custom classes
"
,
function
()
{
$
.
support
.
transition
=
false
var
popover
=
$
(
'
<a href="#">@fat</a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
popover
({
title
:
'
Test
'
,
content
:
'
Test
'
,
template
:
'
<div class="popover foobar"><div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div></div>
'
})
popover
.
popover
(
'
show
'
)
console
.
log
(
popover
)
ok
(
$
(
'
.popover
'
).
length
,
'
popover was inserted
'
)
ok
(
$
(
'
.popover
'
).
hasClass
(
'
foobar
'
),
'
custom class is present
'
)
popover
.
popover
(
'
hide
'
)
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
$
(
'
#qunit-fixture
'
).
empty
()
})
})
})
\ No newline at end of file
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