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
8cf04911
Commit
8cf04911
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
fixes #7776
parent
451acb42
3 merge requests
!8635
ignore Gruntfile.js in jekyll
,
!8656
Added rel="stylesheet" to CDN-Examples
,
!8527
Inner properties move 1
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
docs/assets/js/bootstrap.js
+13
-10
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/assets/js/bootstrap.min.js
js/popover.js
+6
-4
js/popover.js
js/tests/unit/popover.js
+20
-0
js/tests/unit/popover.js
js/tests/unit/tooltip.js
+1
-1
js/tests/unit/tooltip.js
with
41 additions
and
16 deletions
+41
-16
docs/assets/js/bootstrap.js
+
13
-
10
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
()
{
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/bootstrap.min.js
+
1
-
1
View file @
8cf04911
This diff is collapsed.
Click to expand it.
js/popover.js
+
6
-
4
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
()
{
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/popover.js
+
20
-
0
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>
'
)
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/tooltip.js
+
1
-
1
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
'
)
...
...
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