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
4aad5279
Commit
4aad5279
authored
Dec 06, 2013
by
XhmikosR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a space after function consistently.
parent
7b06538c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
36 deletions
+36
-36
dist/js/bootstrap.js
dist/js/bootstrap.js
+2
-2
js/tests/unit/modal.js
js/tests/unit/modal.js
+7
-7
js/tests/unit/phantom.js
js/tests/unit/phantom.js
+4
-4
js/tests/unit/popover.js
js/tests/unit/popover.js
+2
-2
js/tests/unit/tab.js
js/tests/unit/tab.js
+2
-2
js/tests/unit/tooltip.js
js/tests/unit/tooltip.js
+17
-17
js/tooltip.js
js/tooltip.js
+2
-2
No files found.
dist/js/bootstrap.js
View file @
4aad5279
...
@@ -1272,7 +1272,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
...
@@ -1272,7 +1272,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
}
}
}
}
Tooltip
.
prototype
.
applyPlacement
=
function
(
offset
,
placement
)
{
Tooltip
.
prototype
.
applyPlacement
=
function
(
offset
,
placement
)
{
var
replace
var
replace
var
$tip
=
this
.
tip
()
var
$tip
=
this
.
tip
()
var
width
=
$tip
[
0
].
offsetWidth
var
width
=
$tip
[
0
].
offsetWidth
...
@@ -1323,7 +1323,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
...
@@ -1323,7 +1323,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if
(
replace
)
$tip
.
offset
(
offset
)
if
(
replace
)
$tip
.
offset
(
offset
)
}
}
Tooltip
.
prototype
.
replaceArrow
=
function
(
delta
,
dimension
,
position
)
{
Tooltip
.
prototype
.
replaceArrow
=
function
(
delta
,
dimension
,
position
)
{
this
.
arrow
().
css
(
position
,
delta
?
(
50
*
(
1
-
delta
/
dimension
)
+
"
%
"
)
:
''
)
this
.
arrow
().
css
(
position
,
delta
?
(
50
*
(
1
-
delta
/
dimension
)
+
"
%
"
)
:
''
)
}
}
...
...
js/tests/unit/modal.js
View file @
4aad5279
...
@@ -74,7 +74,7 @@ $(function () {
...
@@ -74,7 +74,7 @@ $(function () {
ok
(
$
(
'
#modal-test
'
).
length
,
'
modal inserted into dom
'
)
ok
(
$
(
'
#modal-test
'
).
length
,
'
modal inserted into dom
'
)
$
(
this
).
modal
(
"
hide
"
)
$
(
this
).
modal
(
"
hide
"
)
})
})
.
on
(
"
hidden.bs.modal
"
,
function
()
{
.
on
(
"
hidden.bs.modal
"
,
function
()
{
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
$
(
'
#modal-test
'
).
remove
()
$
(
'
#modal-test
'
).
remove
()
start
()
start
()
...
@@ -92,7 +92,7 @@ $(function () {
...
@@ -92,7 +92,7 @@ $(function () {
ok
(
$
(
'
#modal-test
'
).
length
,
'
modal inserted into dom
'
)
ok
(
$
(
'
#modal-test
'
).
length
,
'
modal inserted into dom
'
)
div
.
modal
(
"
toggle
"
)
div
.
modal
(
"
toggle
"
)
})
})
.
on
(
"
hidden.bs.modal
"
,
function
()
{
.
on
(
"
hidden.bs.modal
"
,
function
()
{
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
div
.
remove
()
div
.
remove
()
start
()
start
()
...
@@ -110,7 +110,7 @@ $(function () {
...
@@ -110,7 +110,7 @@ $(function () {
ok
(
$
(
'
#modal-test
'
).
length
,
'
modal inserted into dom
'
)
ok
(
$
(
'
#modal-test
'
).
length
,
'
modal inserted into dom
'
)
div
.
find
(
'
.close
'
).
click
()
div
.
find
(
'
.close
'
).
click
()
})
})
.
on
(
"
hidden.bs.modal
"
,
function
()
{
.
on
(
"
hidden.bs.modal
"
,
function
()
{
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
div
.
remove
()
div
.
remove
()
start
()
start
()
...
@@ -127,7 +127,7 @@ $(function () {
...
@@ -127,7 +127,7 @@ $(function () {
ok
(
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal visible
'
)
ok
(
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal visible
'
)
div
.
modal
(
"
hide
"
)
div
.
modal
(
"
hide
"
)
})
})
.
on
(
"
hidden.bs.modal
"
,
function
()
{
.
on
(
"
hidden.bs.modal
"
,
function
()
{
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
div
.
remove
()
div
.
remove
()
start
()
start
()
...
@@ -146,7 +146,7 @@ $(function () {
...
@@ -146,7 +146,7 @@ $(function () {
ok
(
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal visible
'
)
ok
(
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal visible
'
)
$
(
'
#modal-test
'
).
click
()
$
(
'
#modal-test
'
).
click
()
})
})
.
bind
(
"
hidden.bs.modal
"
,
function
()
{
.
bind
(
"
hidden.bs.modal
"
,
function
()
{
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
div
.
remove
()
div
.
remove
()
start
()
start
()
...
@@ -164,7 +164,7 @@ $(function () {
...
@@ -164,7 +164,7 @@ $(function () {
triggered
=
0
triggered
=
0
$
(
'
#modal-test
'
).
click
()
$
(
'
#modal-test
'
).
click
()
})
})
.
one
(
"
hidden.bs.modal
"
,
function
()
{
.
one
(
"
hidden.bs.modal
"
,
function
()
{
div
.
modal
(
"
show
"
)
div
.
modal
(
"
show
"
)
})
})
.
bind
(
"
hide.bs.modal
"
,
function
()
{
.
bind
(
"
hide.bs.modal
"
,
function
()
{
...
@@ -184,7 +184,7 @@ $(function () {
...
@@ -184,7 +184,7 @@ $(function () {
$
(
'
#close
'
).
click
()
$
(
'
#close
'
).
click
()
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
ok
(
!
$
(
'
#modal-test
'
).
is
(
"
:visible
"
),
'
modal hidden
'
)
})
})
.
one
(
"
hidden.bs.modal
"
,
function
()
{
.
one
(
"
hidden.bs.modal
"
,
function
()
{
div
.
one
(
'
hidden.bs.modal
'
,
function
()
{
div
.
one
(
'
hidden.bs.modal
'
,
function
()
{
start
()
start
()
}).
modal
(
"
show
"
)
}).
modal
(
"
show
"
)
...
...
js/tests/unit/phantom.js
View file @
4aad5279
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
}
}
// These methods connect QUnit to PhantomJS.
// These methods connect QUnit to PhantomJS.
QUnit
.
log
=
function
(
obj
)
{
QUnit
.
log
=
function
(
obj
)
{
// What is this I don’t even
// What is this I don’t even
if
(
obj
.
message
===
'
[object Object], undefined:undefined
'
)
{
return
}
if
(
obj
.
message
===
'
[object Object], undefined:undefined
'
)
{
return
}
// Parse some stuff before sending it.
// Parse some stuff before sending it.
...
@@ -32,15 +32,15 @@
...
@@ -32,15 +32,15 @@
sendMessage
(
'
qunit.log
'
,
obj
.
result
,
actual
,
expected
,
obj
.
message
,
obj
.
source
)
sendMessage
(
'
qunit.log
'
,
obj
.
result
,
actual
,
expected
,
obj
.
message
,
obj
.
source
)
}
}
QUnit
.
testStart
=
function
(
obj
)
{
QUnit
.
testStart
=
function
(
obj
)
{
sendMessage
(
'
qunit.testStart
'
,
obj
.
name
)
sendMessage
(
'
qunit.testStart
'
,
obj
.
name
)
}
}
QUnit
.
testDone
=
function
(
obj
)
{
QUnit
.
testDone
=
function
(
obj
)
{
sendMessage
(
'
qunit.testDone
'
,
obj
.
name
,
obj
.
failed
,
obj
.
passed
,
obj
.
total
)
sendMessage
(
'
qunit.testDone
'
,
obj
.
name
,
obj
.
failed
,
obj
.
passed
,
obj
.
total
)
}
}
QUnit
.
moduleStart
=
function
(
obj
)
{
QUnit
.
moduleStart
=
function
(
obj
)
{
sendMessage
(
'
qunit.moduleStart
'
,
obj
.
name
)
sendMessage
(
'
qunit.moduleStart
'
,
obj
.
name
)
}
}
...
...
js/tests/unit/popover.js
View file @
4aad5279
...
@@ -97,7 +97,7 @@ $(function () {
...
@@ -97,7 +97,7 @@ $(function () {
$
(
'
#qunit-fixture
'
).
empty
()
$
(
'
#qunit-fixture
'
).
empty
()
})
})
test
(
"
should respect custom classes
"
,
function
()
{
test
(
"
should respect custom classes
"
,
function
()
{
$
.
support
.
transition
=
false
$
.
support
.
transition
=
false
var
popover
=
$
(
'
<a href="#">@fat</a>
'
)
var
popover
=
$
(
'
<a href="#">@fat</a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
appendTo
(
'
#qunit-fixture
'
)
...
@@ -118,7 +118,7 @@ $(function () {
...
@@ -118,7 +118,7 @@ $(function () {
})
})
test
(
"
should destroy popover
"
,
function
()
{
test
(
"
should destroy popover
"
,
function
()
{
var
popover
=
$
(
'
<div/>
'
).
popover
({
trigger
:
'
hover
'
}).
on
(
'
click.foo
'
,
function
(){})
var
popover
=
$
(
'
<div/>
'
).
popover
({
trigger
:
'
hover
'
}).
on
(
'
click.foo
'
,
function
(){})
ok
(
popover
.
data
(
'
bs.popover
'
),
'
popover has data
'
)
ok
(
popover
.
data
(
'
bs.popover
'
),
'
popover has data
'
)
ok
(
$
.
_data
(
popover
[
0
],
'
events
'
).
mouseover
&&
$
.
_data
(
popover
[
0
],
'
events
'
).
mouseout
,
'
popover has hover event
'
)
ok
(
$
.
_data
(
popover
[
0
],
'
events
'
).
mouseover
&&
$
.
_data
(
popover
[
0
],
'
events
'
).
mouseout
,
'
popover has hover event
'
)
ok
(
$
.
_data
(
popover
[
0
],
'
events
'
).
click
[
0
].
namespace
==
'
foo
'
,
'
popover has extra click.foo event
'
)
ok
(
$
.
_data
(
popover
[
0
],
'
events
'
).
click
[
0
].
namespace
==
'
foo
'
,
'
popover has extra click.foo event
'
)
...
...
js/tests/unit/tab.js
View file @
4aad5279
...
@@ -76,9 +76,9 @@ $(function () {
...
@@ -76,9 +76,9 @@ $(function () {
+
'
</ul>
'
+
'
</ul>
'
$
(
dropHTML
).
find
(
'
ul>li:first a
'
).
tab
(
'
show
'
).
end
()
$
(
dropHTML
).
find
(
'
ul>li:first a
'
).
tab
(
'
show
'
).
end
()
.
find
(
'
ul>li:last a
'
).
on
(
'
show
'
,
function
(
event
){
.
find
(
'
ul>li:last a
'
).
on
(
'
show
'
,
function
(
event
){
equal
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
equal
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
}).
on
(
'
shown
'
,
function
(
event
){
}).
on
(
'
shown
'
,
function
(
event
){
equal
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
equal
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
}).
tab
(
'
show
'
)
}).
tab
(
'
show
'
)
})
})
...
...
js/tests/unit/tooltip.js
View file @
4aad5279
...
@@ -69,7 +69,7 @@ $(function () {
...
@@ -69,7 +69,7 @@ $(function () {
test
(
"
should fire show event
"
,
function
()
{
test
(
"
should fire show event
"
,
function
()
{
stop
()
stop
()
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
.
on
(
"
show.bs.tooltip
"
,
function
()
{
.
on
(
"
show.bs.tooltip
"
,
function
()
{
ok
(
true
,
"
show was called
"
)
ok
(
true
,
"
show was called
"
)
start
()
start
()
})
})
...
@@ -79,7 +79,7 @@ $(function () {
...
@@ -79,7 +79,7 @@ $(function () {
test
(
"
should fire shown event
"
,
function
()
{
test
(
"
should fire shown event
"
,
function
()
{
stop
()
stop
()
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
ok
(
true
,
"
shown was called
"
)
ok
(
true
,
"
shown was called
"
)
start
()
start
()
})
})
...
@@ -89,12 +89,12 @@ $(function () {
...
@@ -89,12 +89,12 @@ $(function () {
test
(
"
should not fire shown event when default prevented
"
,
function
()
{
test
(
"
should not fire shown event when default prevented
"
,
function
()
{
stop
()
stop
()
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
.
on
(
"
show.bs.tooltip
"
,
function
(
e
)
{
.
on
(
"
show.bs.tooltip
"
,
function
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
ok
(
true
,
"
show was called
"
)
ok
(
true
,
"
show was called
"
)
start
()
start
()
})
})
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
ok
(
false
,
"
shown was called
"
)
ok
(
false
,
"
shown was called
"
)
})
})
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
...
@@ -103,10 +103,10 @@ $(function () {
...
@@ -103,10 +103,10 @@ $(function () {
test
(
"
should fire hide event
"
,
function
()
{
test
(
"
should fire hide event
"
,
function
()
{
stop
()
stop
()
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
$
(
this
).
tooltip
(
'
hide
'
)
$
(
this
).
tooltip
(
'
hide
'
)
})
})
.
on
(
"
hide.bs.tooltip
"
,
function
()
{
.
on
(
"
hide.bs.tooltip
"
,
function
()
{
ok
(
true
,
"
hide was called
"
)
ok
(
true
,
"
hide was called
"
)
start
()
start
()
})
})
...
@@ -116,10 +116,10 @@ $(function () {
...
@@ -116,10 +116,10 @@ $(function () {
test
(
"
should fire hidden event
"
,
function
()
{
test
(
"
should fire hidden event
"
,
function
()
{
stop
()
stop
()
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
$
(
this
).
tooltip
(
'
hide
'
)
$
(
this
).
tooltip
(
'
hide
'
)
})
})
.
on
(
"
hidden.bs.tooltip
"
,
function
()
{
.
on
(
"
hidden.bs.tooltip
"
,
function
()
{
ok
(
true
,
"
hidden was called
"
)
ok
(
true
,
"
hidden was called
"
)
start
()
start
()
})
})
...
@@ -129,15 +129,15 @@ $(function () {
...
@@ -129,15 +129,15 @@ $(function () {
test
(
"
should not fire hidden event when default prevented
"
,
function
()
{
test
(
"
should not fire hidden event when default prevented
"
,
function
()
{
stop
()
stop
()
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
)
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
.
on
(
"
shown.bs.tooltip
"
,
function
()
{
$
(
this
).
tooltip
(
'
hide
'
)
$
(
this
).
tooltip
(
'
hide
'
)
})
})
.
on
(
"
hide.bs.tooltip
"
,
function
(
e
)
{
.
on
(
"
hide.bs.tooltip
"
,
function
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
ok
(
true
,
"
hide was called
"
)
ok
(
true
,
"
hide was called
"
)
start
()
start
()
})
})
.
on
(
"
hidden.bs.tooltip
"
,
function
()
{
.
on
(
"
hidden.bs.tooltip
"
,
function
()
{
ok
(
false
,
"
hidden was called
"
)
ok
(
false
,
"
hidden was called
"
)
})
})
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
...
@@ -258,7 +258,7 @@ $(function () {
...
@@ -258,7 +258,7 @@ $(function () {
})
})
test
(
"
should destroy tooltip
"
,
function
()
{
test
(
"
should destroy tooltip
"
,
function
()
{
var
tooltip
=
$
(
'
<div/>
'
).
tooltip
().
on
(
'
click.foo
'
,
function
(){})
var
tooltip
=
$
(
'
<div/>
'
).
tooltip
().
on
(
'
click.foo
'
,
function
(){})
ok
(
tooltip
.
data
(
'
bs.tooltip
'
),
'
tooltip has data
'
)
ok
(
tooltip
.
data
(
'
bs.tooltip
'
),
'
tooltip has data
'
)
ok
(
$
.
_data
(
tooltip
[
0
],
'
events
'
).
mouseover
&&
$
.
_data
(
tooltip
[
0
],
'
events
'
).
mouseout
,
'
tooltip has hover event
'
)
ok
(
$
.
_data
(
tooltip
[
0
],
'
events
'
).
mouseover
&&
$
.
_data
(
tooltip
[
0
],
'
events
'
).
mouseout
,
'
tooltip has hover event
'
)
ok
(
$
.
_data
(
tooltip
[
0
],
'
events
'
).
click
[
0
].
namespace
==
'
foo
'
,
'
tooltip has extra click.foo event
'
)
ok
(
$
.
_data
(
tooltip
[
0
],
'
events
'
).
click
[
0
].
namespace
==
'
foo
'
,
'
tooltip has extra click.foo event
'
)
...
@@ -297,7 +297,7 @@ $(function () {
...
@@ -297,7 +297,7 @@ $(function () {
tooltip
.
tooltip
(
'
hide
'
)
tooltip
.
tooltip
(
'
hide
'
)
})
})
test
(
"
should place tooltip inside window
"
,
function
(){
test
(
"
should place tooltip inside window
"
,
function
(){
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
.
css
({
position
:
"
absolute
"
,
width
:
200
,
height
:
200
,
bottom
:
0
,
left
:
0
})
.
css
({
position
:
"
absolute
"
,
width
:
200
,
height
:
200
,
bottom
:
0
,
left
:
0
})
,
tooltip
=
$
(
"
<a href='#' title='Very very very very very very very very long tooltip'>Hover me</a>
"
)
,
tooltip
=
$
(
"
<a href='#' title='Very very very very very very very very long tooltip'>Hover me</a>
"
)
...
@@ -308,7 +308,7 @@ $(function () {
...
@@ -308,7 +308,7 @@ $(function () {
stop
()
stop
()
setTimeout
(
function
(){
setTimeout
(
function
(){
ok
(
$
(
"
.tooltip
"
).
offset
().
left
>=
0
)
ok
(
$
(
"
.tooltip
"
).
offset
().
left
>=
0
)
start
()
start
()
...
@@ -316,7 +316,7 @@ $(function () {
...
@@ -316,7 +316,7 @@ $(function () {
},
100
)
},
100
)
})
})
test
(
"
should place tooltip on top of element
"
,
function
(){
test
(
"
should place tooltip on top of element
"
,
function
(){
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
.
css
({
position
:
"
absolute
"
,
bottom
:
0
,
left
:
0
,
textAlign
:
"
right
"
,
width
:
300
,
height
:
300
})
.
css
({
position
:
"
absolute
"
,
bottom
:
0
,
left
:
0
,
textAlign
:
"
right
"
,
width
:
300
,
height
:
300
})
,
p
=
$
(
"
<p style='margin-top:200px' />
"
).
appendTo
(
container
)
,
p
=
$
(
"
<p style='margin-top:200px' />
"
).
appendTo
(
container
)
...
@@ -328,7 +328,7 @@ $(function () {
...
@@ -328,7 +328,7 @@ $(function () {
stop
()
stop
()
setTimeout
(
function
(){
setTimeout
(
function
(){
var
tooltip
=
container
.
find
(
"
.tooltip
"
)
var
tooltip
=
container
.
find
(
"
.tooltip
"
)
start
()
start
()
...
@@ -337,7 +337,7 @@ $(function () {
...
@@ -337,7 +337,7 @@ $(function () {
},
100
)
},
100
)
})
})
test
(
"
should add position class before positioning so that position-specific styles are taken into account
"
,
function
(){
test
(
"
should add position class before positioning so that position-specific styles are taken into account
"
,
function
(){
$
(
"
head
"
).
append
(
'
<style> .tooltip.right { white-space: nowrap; } .tooltip.right .tooltip-inner { max-width: none; } </style>
'
)
$
(
"
head
"
).
append
(
'
<style> .tooltip.right { white-space: nowrap; } .tooltip.right .tooltip-inner { max-width: none; } </style>
'
)
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
var
container
=
$
(
"
<div />
"
).
appendTo
(
"
body
"
)
...
...
js/tooltip.js
View file @
4aad5279
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
}
}
}
}
Tooltip
.
prototype
.
applyPlacement
=
function
(
offset
,
placement
)
{
Tooltip
.
prototype
.
applyPlacement
=
function
(
offset
,
placement
)
{
var
replace
var
replace
var
$tip
=
this
.
tip
()
var
$tip
=
this
.
tip
()
var
width
=
$tip
[
0
].
offsetWidth
var
width
=
$tip
[
0
].
offsetWidth
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
if
(
replace
)
$tip
.
offset
(
offset
)
if
(
replace
)
$tip
.
offset
(
offset
)
}
}
Tooltip
.
prototype
.
replaceArrow
=
function
(
delta
,
dimension
,
position
)
{
Tooltip
.
prototype
.
replaceArrow
=
function
(
delta
,
dimension
,
position
)
{
this
.
arrow
().
css
(
position
,
delta
?
(
50
*
(
1
-
delta
/
dimension
)
+
"
%
"
)
:
''
)
this
.
arrow
().
css
(
position
,
delta
?
(
50
*
(
1
-
delta
/
dimension
)
+
"
%
"
)
:
''
)
}
}
...
...
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