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
6c221d65
Commit
6c221d65
authored
Apr 15, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.3-wip' of github.com:twitter/bootstrap into 2.0.3-wip
Conflicts: docs/assets/bootstrap.zip
parents
a4c2332e
c262ead6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
55 deletions
+87
-55
Makefile
Makefile
+1
-1
docs/assets/bootstrap.zip
docs/assets/bootstrap.zip
+0
-0
docs/assets/js/bootstrap-scrollspy.js
docs/assets/js/bootstrap-scrollspy.js
+4
-5
docs/assets/js/bootstrap-tooltip.js
docs/assets/js/bootstrap-tooltip.js
+14
-22
js/bootstrap-scrollspy.js
js/bootstrap-scrollspy.js
+4
-5
js/bootstrap-tooltip.js
js/bootstrap-tooltip.js
+14
-22
js/tests/unit/bootstrap-tooltip.js
js/tests/unit/bootstrap-tooltip.js
+50
-0
No files found.
Makefile
View file @
6c221d65
...
@@ -36,7 +36,7 @@ bootstrap:
...
@@ -36,7 +36,7 @@ bootstrap:
jshint js/tests/unit/
*
.js
--config
js/.jshintrc
jshint js/tests/unit/
*
.js
--config
js/.jshintrc
cat
js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js
>
bootstrap/js/bootstrap.js
cat
js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js
>
bootstrap/js/bootstrap.js
uglifyjs
-nc
bootstrap/js/bootstrap.js
>
bootstrap/js/bootstrap.min.tmp.js
uglifyjs
-nc
bootstrap/js/bootstrap.js
>
bootstrap/js/bootstrap.min.tmp.js
echo
"/*
*
\n
* Bootstrap.js by @fat & @mdo
\n
* Copyright 2012 Twitter, Inc.
\n
* http://www.apache.org/licenses/LICENSE-2.0.txt
\n
*/"
>
bootstrap/js/copyright.js
echo
"/*
!
\n
* Bootstrap.js by @fat & @mdo
\n
* Copyright 2012 Twitter, Inc.
\n
* http://www.apache.org/licenses/LICENSE-2.0.txt
\n
*/"
>
bootstrap/js/copyright.js
cat
bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
>
bootstrap/js/bootstrap.min.js
cat
bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
>
bootstrap/js/bootstrap.min.js
rm
bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
rm
bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
...
...
docs/assets/bootstrap.zip
View file @
6c221d65
No preview for this file type
docs/assets/js/bootstrap-scrollspy.js
View file @
6c221d65
...
@@ -94,16 +94,15 @@
...
@@ -94,16 +94,15 @@
this
.
activeTarget
=
target
this
.
activeTarget
=
target
this
.
$body
$
(
this
.
selector
)
.
find
(
this
.
selector
).
parent
(
'
.active
'
)
.
parent
(
'
.active
'
)
.
removeClass
(
'
active
'
)
.
removeClass
(
'
active
'
)
active
=
this
.
$body
active
=
$
(
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
)
.
find
(
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
)
.
parent
(
'
li
'
)
.
parent
(
'
li
'
)
.
addClass
(
'
active
'
)
.
addClass
(
'
active
'
)
if
(
active
.
parent
(
'
.dropdown-menu
'
)
)
{
if
(
active
.
parent
(
'
.dropdown-menu
'
)
)
{
active
=
active
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
active
=
active
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
}
}
...
...
docs/assets/js/bootstrap-tooltip.js
View file @
6c221d65
...
@@ -72,33 +72,25 @@
...
@@ -72,33 +72,25 @@
,
enter
:
function
(
e
)
{
,
enter
:
function
(
e
)
{
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
{
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
return
self
.
show
()
self
.
show
()
}
else
{
clearTimeout
(
this
.
timeout
)
clearTimeout
(
this
.
timeout
)
self
.
hoverState
=
'
in
'
self
.
hoverState
=
'
in
'
this
.
timeout
=
setTimeout
(
function
()
{
this
.
timeout
=
setTimeout
(
function
()
{
if
(
self
.
hoverState
==
'
in
'
)
self
.
show
()
if
(
self
.
hoverState
==
'
in
'
)
{
},
self
.
options
.
delay
.
show
)
self
.
show
()
}
},
self
.
options
.
delay
.
show
)
}
}
}
,
leave
:
function
(
e
)
{
,
leave
:
function
(
e
)
{
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
hide
)
{
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
hide
)
return
self
.
hide
()
self
.
hide
()
}
else
{
clearTimeout
(
this
.
timeout
)
clearTimeout
(
this
.
timeout
)
self
.
hoverState
=
'
out
'
self
.
hoverState
=
'
out
'
this
.
timeout
=
setTimeout
(
function
()
{
this
.
timeout
=
setTimeout
(
function
()
{
if
(
self
.
hoverState
==
'
out
'
)
self
.
hide
()
if
(
self
.
hoverState
==
'
out
'
)
{
},
self
.
options
.
delay
.
hide
)
self
.
hide
()
}
},
self
.
options
.
delay
.
hide
)
}
}
}
,
show
:
function
()
{
,
show
:
function
()
{
...
...
js/bootstrap-scrollspy.js
View file @
6c221d65
...
@@ -94,16 +94,15 @@
...
@@ -94,16 +94,15 @@
this
.
activeTarget
=
target
this
.
activeTarget
=
target
this
.
$body
$
(
this
.
selector
)
.
find
(
this
.
selector
).
parent
(
'
.active
'
)
.
parent
(
'
.active
'
)
.
removeClass
(
'
active
'
)
.
removeClass
(
'
active
'
)
active
=
this
.
$body
active
=
$
(
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
)
.
find
(
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
)
.
parent
(
'
li
'
)
.
parent
(
'
li
'
)
.
addClass
(
'
active
'
)
.
addClass
(
'
active
'
)
if
(
active
.
parent
(
'
.dropdown-menu
'
)
)
{
if
(
active
.
parent
(
'
.dropdown-menu
'
)
)
{
active
=
active
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
active
=
active
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
}
}
...
...
js/bootstrap-tooltip.js
View file @
6c221d65
...
@@ -72,33 +72,25 @@
...
@@ -72,33 +72,25 @@
,
enter
:
function
(
e
)
{
,
enter
:
function
(
e
)
{
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
{
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
return
self
.
show
()
self
.
show
()
}
else
{
clearTimeout
(
this
.
timeout
)
clearTimeout
(
this
.
timeout
)
self
.
hoverState
=
'
in
'
self
.
hoverState
=
'
in
'
this
.
timeout
=
setTimeout
(
function
()
{
this
.
timeout
=
setTimeout
(
function
()
{
if
(
self
.
hoverState
==
'
in
'
)
self
.
show
()
if
(
self
.
hoverState
==
'
in
'
)
{
},
self
.
options
.
delay
.
show
)
self
.
show
()
}
},
self
.
options
.
delay
.
show
)
}
}
}
,
leave
:
function
(
e
)
{
,
leave
:
function
(
e
)
{
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
var
self
=
$
(
e
.
currentTarget
)[
this
.
type
](
this
.
_options
).
data
(
this
.
type
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
hide
)
{
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
hide
)
return
self
.
hide
()
self
.
hide
()
}
else
{
clearTimeout
(
this
.
timeout
)
clearTimeout
(
this
.
timeout
)
self
.
hoverState
=
'
out
'
self
.
hoverState
=
'
out
'
this
.
timeout
=
setTimeout
(
function
()
{
this
.
timeout
=
setTimeout
(
function
()
{
if
(
self
.
hoverState
==
'
out
'
)
self
.
hide
()
if
(
self
.
hoverState
==
'
out
'
)
{
},
self
.
options
.
delay
.
hide
)
self
.
hide
()
}
},
self
.
options
.
delay
.
hide
)
}
}
}
,
show
:
function
()
{
,
show
:
function
()
{
...
...
js/tests/unit/bootstrap-tooltip.js
View file @
6c221d65
...
@@ -59,6 +59,56 @@ $(function () {
...
@@ -59,6 +59,56 @@ $(function () {
ok
(
!
$
(
"
.tooltip
"
).
length
,
'
tooltip removed
'
)
ok
(
!
$
(
"
.tooltip
"
).
length
,
'
tooltip removed
'
)
})
})
test
(
"
should not show tooltip if leave event occurs before delay expires
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
delay
:
200
})
stop
()
tooltip
.
trigger
(
'
mouseenter
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
hasClass
(
'
fade in
'
),
'
tooltip is not faded in
'
)
tooltip
.
trigger
(
'
mouseout
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
hasClass
(
'
fade in
'
),
'
tooltip is not faded in
'
)
start
()
},
200
)
},
100
)
})
test
(
"
should not show tooltip if leave event occurs before delay expires
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
delay
:
100
})
stop
()
tooltip
.
trigger
(
'
mouseenter
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
hasClass
(
'
fade in
'
),
'
tooltip is not faded in
'
)
tooltip
.
trigger
(
'
mouseout
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
hasClass
(
'
fade in
'
),
'
tooltip is not faded in
'
)
start
()
},
100
)
},
50
)
})
test
(
"
should show tooltip if leave event hasn't occured before delay expires
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
delay
:
200
})
stop
()
tooltip
.
trigger
(
'
mouseenter
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
hasClass
(
'
fade in
'
),
'
tooltip is not faded in
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
hasClass
(
'
fade in
'
),
'
tooltip has faded in
'
)
start
()
},
200
)
},
100
)
})
test
(
"
should detect if title string is html or text: foo
"
,
function
()
{
test
(
"
should detect if title string is html or text: foo
"
,
function
()
{
ok
(
!
$
.
fn
.
tooltip
.
Constructor
.
prototype
.
isHTML
(
'
foo
'
),
'
correctly detected html
'
)
ok
(
!
$
.
fn
.
tooltip
.
Constructor
.
prototype
.
isHTML
(
'
foo
'
),
'
correctly detected html
'
)
})
})
...
...
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