Skip to content
GitLab
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
537e1003
Commit
537e1003
authored
11 years ago
by
XhmikosR
Browse files
Options
Download
Email Patches
Plain Diff
Switch to using JSCS for the indentation check.
parent
299f985e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
docs/assets/js/customizer.js
+6
-6
docs/assets/js/customizer.js
grunt/.jshintrc
+11
-12
grunt/.jshintrc
js/.jscsrc
+2
-1
js/.jscsrc
js/.jshintrc
+1
-2
js/.jshintrc
js/tests/unit/tooltip.js
+12
-13
js/tests/unit/tooltip.js
with
32 additions
and
34 deletions
+32
-34
docs/assets/js/customizer.js
+
6
-
6
View file @
537e1003
...
@@ -72,9 +72,9 @@ window.onload = function () { // wait for load in a dumb way because B-0
...
@@ -72,9 +72,9 @@ window.onload = function () { // wait for load in a dumb way because B-0
var
vars
=
{}
var
vars
=
{}
$
(
'
#less-variables-section input
'
)
$
(
'
#less-variables-section input
'
)
.
each
(
function
()
{
.
each
(
function
()
{
$
(
this
).
val
()
&&
(
vars
[
$
(
this
).
prev
().
text
()]
=
$
(
this
).
val
())
$
(
this
).
val
()
&&
(
vars
[
$
(
this
).
prev
().
text
()]
=
$
(
this
).
val
())
})
})
var
data
=
{
var
data
=
{
vars
:
vars
,
vars
:
vars
,
...
@@ -238,9 +238,9 @@ window.onload = function () { // wait for load in a dumb way because B-0
...
@@ -238,9 +238,9 @@ window.onload = function () { // wait for load in a dumb way because B-0
var
vars
=
{}
var
vars
=
{}
$
(
'
#less-variables-section input
'
)
$
(
'
#less-variables-section input
'
)
.
each
(
function
()
{
.
each
(
function
()
{
$
(
this
).
val
()
&&
(
vars
[
$
(
this
).
prev
().
text
()]
=
$
(
this
).
val
())
$
(
this
).
val
()
&&
(
vars
[
$
(
this
).
prev
().
text
()]
=
$
(
this
).
val
())
})
})
var
bsLessSource
=
generateLESS
(
'
bootstrap.less
'
,
lessFileIncludes
,
vars
)
var
bsLessSource
=
generateLESS
(
'
bootstrap.less
'
,
lessFileIncludes
,
vars
)
var
themeLessSource
=
generateLESS
(
'
theme.less
'
,
lessFileIncludes
,
vars
)
var
themeLessSource
=
generateLESS
(
'
theme.less
'
,
lessFileIncludes
,
vars
)
...
...
This diff is collapsed.
Click to expand it.
grunt/.jshintrc
+
11
-
12
View file @
537e1003
{
{
"camelcase": true,
"camelcase": true,
"curly": true,
"curly" : true,
"eqeqeq": true,
"eqeqeq" : true,
"immed": true,
"immed" : true,
"indent": 2,
"newcap" : true,
"newcap": true,
"noarg" : true,
"noarg": true,
"node" : true,
"node": true,
"nonbsp" : true,
"nonbsp": true,
"quotmark" : "single",
"quotmark": "single",
"strict" : true,
"strict": true,
"trailing" : true,
"trailing": true,
"undef" : true
"undef": true
}
}
This diff is collapsed.
Click to expand it.
js/.jscsrc
+
2
-
1
View file @
537e1003
{
{
"disallowKeywords": ["with"],
"disallowKeywords": ["with"],
"requireLeftStickedOperators": [","],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true,
"requireLineFeedAtFileEnd": true,
"requireRightStickedOperators": ["!"],
"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"validateIndentation": 2,
"validateLineBreaks": "LF"
"validateLineBreaks": "LF"
}
}
This diff is collapsed.
Click to expand it.
js/.jshintrc
+
1
-
2
View file @
537e1003
...
@@ -7,8 +7,7 @@
...
@@ -7,8 +7,7 @@
"eqeqeq" : false,
"eqeqeq" : false,
"eqnull" : true,
"eqnull" : true,
"expr" : true,
"expr" : true,
"indent" : 2,
"laxbreak" : true,
"laxbreak" : true,
"quotmark" : "single",
"quotmark" : "single",
"validthis": true
"validthis": true
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
js/tests/unit/tooltip.js
+
12
-
13
View file @
537e1003
...
@@ -273,8 +273,7 @@ $(function () {
...
@@ -273,8 +273,7 @@ $(function () {
test
(
'
should show tooltip with delegate selector on click
'
,
function
()
{
test
(
'
should show tooltip with delegate selector on click
'
,
function
()
{
var
div
=
$
(
'
<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>
'
)
var
div
=
$
(
'
<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>
'
)
var
tooltip
=
div
.
appendTo
(
'
#qunit-fixture
'
)
var
tooltip
=
div
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
selector
:
'
a[rel=tooltip]
'
,
.
tooltip
({
selector
:
'
a[rel=tooltip]
'
,
trigger
:
'
click
'
})
trigger
:
'
click
'
})
div
.
find
(
'
a
'
).
trigger
(
'
click
'
)
div
.
find
(
'
a
'
).
trigger
(
'
click
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.fade.in
'
),
'
tooltip is faded in
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.fade.in
'
),
'
tooltip is faded in
'
)
})
})
...
@@ -392,21 +391,21 @@ $(function () {
...
@@ -392,21 +391,21 @@ $(function () {
test
(
'
tooltips should be placed dynamically, with the dynamic placement option
'
,
function
()
{
test
(
'
tooltips should be placed dynamically, with the dynamic placement option
'
,
function
()
{
$
.
support
.
transition
=
false
$
.
support
.
transition
=
false
var
ttContainer
=
$
(
'
<div id="dynamic-tt-test"/>
'
).
css
({
var
ttContainer
=
$
(
'
<div id="dynamic-tt-test"/>
'
).
css
({
'
height
'
:
400
,
'
height
'
:
400
,
'
overflow
'
:
'
hidden
'
,
'
overflow
'
:
'
hidden
'
,
'
position
'
:
'
absolute
'
,
'
position
'
:
'
absolute
'
,
'
top
'
:
0
,
'
top
'
:
0
,
'
left
'
:
0
,
'
left
'
:
0
,
'
width
'
:
600
'
width
'
:
600
})
})
.
appendTo
(
'
body
'
)
.
appendTo
(
'
body
'
)
var
topTooltip
=
$
(
'
<div style="display: inline-block; position: absolute; left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>
'
)
var
topTooltip
=
$
(
'
<div style="display: inline-block; position: absolute; left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>
'
)
.
appendTo
(
'
#dynamic-tt-test
'
)
.
appendTo
(
'
#dynamic-tt-test
'
)
.
tooltip
({
placement
:
'
auto
'
})
.
tooltip
({
placement
:
'
auto
'
})
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.bottom
'
),
'
top positioned tooltip is dynamically positioned bottom
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.bottom
'
),
'
top positioned tooltip is dynamically positioned bottom
'
)
topTooltip
.
tooltip
(
'
hide
'
)
topTooltip
.
tooltip
(
'
hide
'
)
...
@@ -415,7 +414,7 @@ $(function () {
...
@@ -415,7 +414,7 @@ $(function () {
.
tooltip
({
placement
:
'
right auto
'
})
.
tooltip
({
placement
:
'
right auto
'
})
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.left
'
),
'
right positioned tooltip is dynamically positioned left
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.left
'
),
'
right positioned tooltip is dynamically positioned left
'
)
rightTooltip
.
tooltip
(
'
hide
'
)
rightTooltip
.
tooltip
(
'
hide
'
)
var
leftTooltip
=
$
(
'
<div style="display: inline-block; position: absolute; left: 0;" rel="tooltip" title="Left tooltip">Left Dynamic Tooltip</div>
'
)
var
leftTooltip
=
$
(
'
<div style="display: inline-block; position: absolute; left: 0;" rel="tooltip" title="Left tooltip">Left Dynamic Tooltip</div>
'
)
...
@@ -423,7 +422,7 @@ $(function () {
...
@@ -423,7 +422,7 @@ $(function () {
.
tooltip
({
placement
:
'
auto left
'
})
.
tooltip
({
placement
:
'
auto left
'
})
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.right
'
),
'
left positioned tooltip is dynamically positioned right
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.right
'
),
'
left positioned tooltip is dynamically positioned right
'
)
leftTooltip
.
tooltip
(
'
hide
'
)
leftTooltip
.
tooltip
(
'
hide
'
)
ttContainer
.
remove
()
ttContainer
.
remove
()
...
...
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