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
351f86e1
Commit
351f86e1
authored
11 years ago
by
Chris Rebert
Browse files
Options
Download
Email Patches
Plain Diff
fix some JS to pass jscs
parent
4be126e0
1 merge request
!11761
add JavaScript Code Style checker integration
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
Gruntfile.js
+1
-1
Gruntfile.js
js/dropdown.js
+1
-1
js/dropdown.js
js/modal.js
+1
-1
js/modal.js
js/tests/unit/scrollspy.js
+1
-1
js/tests/unit/scrollspy.js
js/tests/unit/tooltip.js
+3
-3
js/tests/unit/tooltip.js
js/tooltip.js
+1
-1
js/tooltip.js
with
8 additions
and
8 deletions
+8
-8
Gruntfile.js
+
1
-
1
View file @
351f86e1
/* jshint node: true */
/* jshint node: true */
module
.
exports
=
function
(
grunt
)
{
module
.
exports
=
function
(
grunt
)
{
"
use strict
"
;
"
use strict
"
;
// Force use of Unix newlines
// Force use of Unix newlines
...
...
This diff is collapsed.
Click to expand it.
js/dropdown.js
+
1
-
1
View file @
351f86e1
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
if
(
e
.
keyCode
==
38
&&
index
>
0
)
index
--
// up
if
(
e
.
keyCode
==
38
&&
index
>
0
)
index
--
// up
if
(
e
.
keyCode
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
if
(
e
.
keyCode
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
if
(
!~
index
)
index
=
0
if
(
!~
index
)
index
=
0
$items
.
eq
(
index
).
focus
()
$items
.
eq
(
index
).
focus
()
}
}
...
...
This diff is collapsed.
Click to expand it.
js/modal.js
+
1
-
1
View file @
351f86e1
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
}
else
if
(
!
this
.
isShown
&&
this
.
$backdrop
)
{
}
else
if
(
!
this
.
isShown
&&
this
.
$backdrop
)
{
this
.
$backdrop
.
removeClass
(
'
in
'
)
this
.
$backdrop
.
removeClass
(
'
in
'
)
$
.
support
.
transition
&&
this
.
$element
.
hasClass
(
'
fade
'
)?
$
.
support
.
transition
&&
this
.
$element
.
hasClass
(
'
fade
'
)
?
this
.
$backdrop
this
.
$backdrop
.
one
(
$
.
support
.
transition
.
end
,
callback
)
.
one
(
$
.
support
.
transition
.
end
,
callback
)
.
emulateTransitionEnd
(
150
)
:
.
emulateTransitionEnd
(
150
)
:
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/scrollspy.js
+
1
-
1
View file @
351f86e1
...
@@ -19,7 +19,7 @@ $(function () {
...
@@ -19,7 +19,7 @@ $(function () {
test
(
"
should switch active class on scroll
"
,
function
()
{
test
(
"
should switch active class on scroll
"
,
function
()
{
var
sectionHTML
=
'
<div id="masthead"></div>
'
var
sectionHTML
=
'
<div id="masthead"></div>
'
,
$section
=
$
(
sectionHTML
).
append
(
'
#qunit-fixture
'
)
,
$section
=
$
(
sectionHTML
).
append
(
'
#qunit-fixture
'
)
,
topbarHTML
=
'
<div class="topbar">
'
,
topbarHTML
=
'
<div class="topbar">
'
+
'
<div class="topbar-inner">
'
+
'
<div class="topbar-inner">
'
+
'
<div class="container">
'
+
'
<div class="container">
'
+
'
<h3><a href="#">Bootstrap</a></h3>
'
+
'
<h3><a href="#">Bootstrap</a></h3>
'
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/tooltip.js
+
3
-
3
View file @
351f86e1
...
@@ -290,7 +290,7 @@ $(function () {
...
@@ -290,7 +290,7 @@ $(function () {
test
(
"
should place tooltips inside the body
"
,
function
()
{
test
(
"
should place tooltips inside the body
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
container
:
'
body
'
})
.
tooltip
({
container
:
'
body
'
})
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
ok
(
$
(
"
body > .tooltip
"
).
length
,
'
inside the body
'
)
ok
(
$
(
"
body > .tooltip
"
).
length
,
'
inside the body
'
)
ok
(
!
$
(
"
#qunit-fixture > .tooltip
"
).
length
,
'
not found in parent
'
)
ok
(
!
$
(
"
#qunit-fixture > .tooltip
"
).
length
,
'
not found in parent
'
)
...
@@ -301,7 +301,7 @@ $(function () {
...
@@ -301,7 +301,7 @@ $(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>
"
)
.
css
({
position
:
"
absolute
"
,
top
:
0
,
left
:
0
})
.
css
({
position
:
"
absolute
"
,
top
:
0
,
left
:
0
})
.
appendTo
(
container
)
.
appendTo
(
container
)
.
tooltip
({
placement
:
"
top
"
,
animate
:
false
})
.
tooltip
({
placement
:
"
top
"
,
animate
:
false
})
.
tooltip
(
"
show
"
)
.
tooltip
(
"
show
"
)
...
@@ -347,7 +347,7 @@ $(function () {
...
@@ -347,7 +347,7 @@ $(function () {
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
,
tooltip
=
container
.
find
(
"
.tooltip
"
)
,
tooltip
=
container
.
find
(
"
.tooltip
"
)
ok
(
Math
.
round
(
target
.
offset
().
top
+
target
[
0
].
offsetHeight
/
2
-
tooltip
[
0
].
offsetHeight
/
2
)
===
Math
.
round
(
tooltip
.
offset
().
top
)
)
ok
(
Math
.
round
(
target
.
offset
().
top
+
(
target
[
0
].
offsetHeight
/
2
)
-
(
tooltip
[
0
].
offsetHeight
/
2
)
)
===
Math
.
round
(
tooltip
.
offset
().
top
)
)
target
.
tooltip
(
'
hide
'
)
target
.
tooltip
(
'
hide
'
)
})
})
...
...
This diff is collapsed.
Click to expand it.
js/tooltip.js
+
1
-
1
View file @
351f86e1
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
}
}
Tooltip
.
prototype
.
show
=
function
()
{
Tooltip
.
prototype
.
show
=
function
()
{
var
e
=
$
.
Event
(
'
show.bs.
'
+
this
.
type
)
var
e
=
$
.
Event
(
'
show.bs.
'
+
this
.
type
)
if
(
this
.
hasContent
()
&&
this
.
enabled
)
{
if
(
this
.
hasContent
()
&&
this
.
enabled
)
{
this
.
$element
.
trigger
(
e
)
this
.
$element
.
trigger
(
e
)
...
...
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