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
3e7ca3bb
Commit
3e7ca3bb
authored
Apr 26, 2015
by
XhmikosR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor lint tweaks.
parent
4e027718
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
65 additions
and
69 deletions
+65
-69
docs/assets/js/src/customizer.js
docs/assets/js/src/customizer.js
+9
-8
grunt/bs-commonjs-generator.js
grunt/bs-commonjs-generator.js
+2
-2
grunt/bs-glyphicons-data-generator.js
grunt/bs-glyphicons-data-generator.js
+1
-2
grunt/bs-lessdoc-parser.js
grunt/bs-lessdoc-parser.js
+4
-6
grunt/bs-raw-files-generator.js
grunt/bs-raw-files-generator.js
+5
-7
js/button.js
js/button.js
+1
-1
js/dropdown.js
js/dropdown.js
+38
-38
js/tab.js
js/tab.js
+1
-1
js/tooltip.js
js/tooltip.js
+3
-3
package.js
package.js
+1
-1
No files found.
docs/assets/js/src/customizer.js
View file @
3e7ca3bb
...
...
@@ -17,7 +17,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
'
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
\n
'
+
'
*/
\n\n
'
var
supportsFile
=
(
window
.
File
&&
window
.
FileReader
&&
window
.
FileList
&&
window
.
Blob
)
var
supportsFile
=
window
.
File
&&
window
.
FileReader
&&
window
.
FileList
&&
window
.
Blob
var
importDropTarget
=
$
(
'
#import-drop-target
'
)
function
showError
(
msg
,
err
)
{
...
...
@@ -112,7 +112,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
js
:
$
(
'
#plugin-section input:checked
'
).
map
(
function
()
{
return
this
.
value
}).
toArray
()
}
if
(
$
.
isEmptyObject
(
data
.
vars
)
&&
!
data
.
css
.
length
&&
!
data
.
js
.
length
)
return
if
(
$
.
isEmptyObject
(
data
.
vars
)
&&
!
data
.
css
.
length
&&
!
data
.
js
.
length
)
return
null
return
data
}
...
...
@@ -241,11 +241,11 @@ window.onload = function () { // wait for load in a dumb way because B-0
// Core stylesheets like 'normalize.less' are not included in the form
// since disabling them would wreck everything, and so their 'fileInclude'
// will be 'undefined'.
if
(
fileInclude
||
(
fileInclude
==
null
)
)
lessSource
+=
__less
[
filename
]
if
(
fileInclude
||
fileInclude
==
null
)
lessSource
+=
__less
[
filename
]
// Custom variables are added after Bootstrap variables so the custom
// ones take precedence.
if
(
(
'
variables.less
'
===
filename
)
&&
vars
)
lessSource
+=
generateCustomLess
(
vars
)
if
(
filename
===
'
variables.less
'
&&
vars
)
lessSource
+=
generateCustomLess
(
vars
)
})
lessSource
=
lessSource
.
replace
(
/@import
[^\n]
*/gi
,
''
)
// strip any imports
...
...
@@ -267,8 +267,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
try
{
intoResult
[
baseFilename
+
'
.css
'
]
=
cw
+
tree
.
toCSS
()
intoResult
[
baseFilename
+
'
.min.css
'
]
=
cw
+
tree
.
toCSS
({
compress
:
true
})
}
catch
(
compileErr
)
{
}
catch
(
compileErr
)
{
return
promise
.
reject
(
compileErr
)
}
promise
.
resolve
()
...
...
@@ -366,7 +365,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
e
.
stopPropagation
()
e
.
preventDefault
()
var
file
=
(
e
.
originalEvent
.
hasOwnProperty
(
'
dataTransfer
'
)
)
?
e
.
originalEvent
.
dataTransfer
.
files
[
0
]
:
e
.
originalEvent
.
target
.
files
[
0
]
var
file
=
e
.
originalEvent
.
hasOwnProperty
(
'
dataTransfer
'
)
?
e
.
originalEvent
.
dataTransfer
.
files
[
0
]
:
e
.
originalEvent
.
target
.
files
[
0
]
var
reader
=
new
FileReader
()
...
...
@@ -474,7 +473,9 @@ window.onload = function () { // wait for load in a dumb way because B-0
).
done
(
function
(
css
,
js
,
fonts
)
{
generateZip
(
css
,
js
,
fonts
,
configJson
,
function
(
blob
)
{
$compileBtn
.
removeAttr
(
'
disabled
'
)
setTimeout
(
function
()
{
saveAs
(
blob
,
'
bootstrap.zip
'
)
},
0
)
setTimeout
(
function
()
{
saveAs
(
blob
,
'
bootstrap.zip
'
)
},
0
)
})
})
})
...
...
grunt/bs-commonjs-generator.js
View file @
3e7ca3bb
'
use strict
'
;
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
...
...
@@ -15,8 +16,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath)
var
moduleOutputJs
=
COMMONJS_BANNER
+
srcFiles
.
map
(
srcPathToDestRequire
).
join
(
'
\n
'
);
try
{
fs
.
writeFileSync
(
destFilepath
,
moduleOutputJs
);
}
catch
(
err
)
{
}
catch
(
err
)
{
grunt
.
fail
.
warn
(
err
);
}
grunt
.
log
.
writeln
(
'
File
'
+
destFilepath
.
cyan
+
'
created.
'
);
...
...
grunt/bs-glyphicons-data-generator.js
View file @
3e7ca3bb
...
...
@@ -33,8 +33,7 @@ module.exports = function generateGlyphiconsData(grunt) {
try
{
fs
.
writeFileSync
(
glyphiconsYml
,
glyphiconsData
);
}
catch
(
err
)
{
}
catch
(
err
)
{
grunt
.
fail
.
warn
(
err
);
}
grunt
.
log
.
writeln
(
'
File
'
+
glyphiconsYml
.
cyan
+
'
created.
'
);
...
...
grunt/bs-lessdoc-parser.js
View file @
3e7ca3bb
...
...
@@ -121,7 +121,7 @@ Tokenizer.prototype._shift = function () {
return
new
VarDocstring
(
match
[
1
]);
}
var
commentStart
=
line
.
lastIndexOf
(
'
//
'
);
var
varLine
=
(
commentStart
===
-
1
)
?
line
:
line
.
slice
(
0
,
commentStart
);
var
varLine
=
commentStart
===
-
1
?
line
:
line
.
slice
(
0
,
commentStart
);
match
=
VAR_ASSIGNMENT
.
exec
(
varLine
);
if
(
match
!==
null
)
{
return
new
Variable
(
match
[
1
],
match
[
2
]);
...
...
@@ -168,8 +168,7 @@ Parser.prototype.parseSection = function () {
var
docstring
=
this
.
_tokenizer
.
shift
();
if
(
docstring
instanceof
SectionDocstring
)
{
section
.
docstring
=
docstring
;
}
else
{
}
else
{
this
.
_tokenizer
.
unshift
(
docstring
);
}
this
.
parseSubSections
(
section
);
...
...
@@ -185,15 +184,14 @@ Parser.prototype.parseSubSections = function (section) {
// Presume an implicit initial subsection
subsection
=
new
SubSection
(
''
);
this
.
parseVars
(
subsection
);
}
else
{
}
else
{
break
;
}
}
section
.
addSubSection
(
subsection
);
}
if
(
section
.
subsections
.
length
===
1
&&
!
(
section
.
subsections
[
0
].
heading
)
&&
section
.
subsections
[
0
].
variables
.
length
===
0
)
{
if
(
section
.
subsections
.
length
===
1
&&
!
section
.
subsections
[
0
].
heading
&&
section
.
subsections
[
0
].
variables
.
length
===
0
)
{
// Ignore lone empty implicit subsection
section
.
subsections
=
[];
}
...
...
grunt/bs-raw-files-generator.js
View file @
3e7ca3bb
...
...
@@ -5,24 +5,23 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/* global btoa: true */
'
use strict
'
;
var
fs
=
require
(
'
fs
'
);
var
btoa
=
require
(
'
btoa
'
);
var
glob
=
require
(
'
glob
'
);
function
getFiles
(
type
)
{
var
files
=
{};
var
recursive
=
(
type
===
'
less
'
)
;
var
globExpr
=
(
recursive
?
'
/**/*
'
:
'
/*
'
)
;
var
recursive
=
type
===
'
less
'
;
var
globExpr
=
recursive
?
'
/**/*
'
:
'
/*
'
;
glob
.
sync
(
type
+
globExpr
)
.
filter
(
function
(
path
)
{
return
type
===
'
fonts
'
?
true
:
new
RegExp
(
'
\\
.
'
+
type
+
'
$
'
).
test
(
path
);
})
.
forEach
(
function
(
fullPath
)
{
var
relativePath
=
fullPath
.
replace
(
/^
[^/]
+
\/
/
,
''
);
files
[
relativePath
]
=
(
type
===
'
fonts
'
?
btoa
(
fs
.
readFileSync
(
fullPath
))
:
fs
.
readFileSync
(
fullPath
,
'
utf8
'
)
);
files
[
relativePath
]
=
type
===
'
fonts
'
?
btoa
(
fs
.
readFileSync
(
fullPath
))
:
fs
.
readFileSync
(
fullPath
,
'
utf8
'
);
});
return
'
var __
'
+
type
+
'
=
'
+
JSON
.
stringify
(
files
)
+
'
\n
'
;
}
...
...
@@ -38,8 +37,7 @@ module.exports = function generateRawFilesJs(grunt, banner) {
var
rawFilesJs
=
'
docs/assets/js/raw-files.min.js
'
;
try
{
fs
.
writeFileSync
(
rawFilesJs
,
files
);
}
catch
(
err
)
{
}
catch
(
err
)
{
grunt
.
fail
.
warn
(
err
);
}
grunt
.
log
.
writeln
(
'
File
'
+
rawFilesJs
.
cyan
+
'
created.
'
);
...
...
js/button.js
View file @
3e7ca3bb
...
...
@@ -31,7 +31,7 @@
var
val
=
$el
.
is
(
'
input
'
)
?
'
val
'
:
'
html
'
var
data
=
$el
.
data
()
state
=
state
+
'
Text
'
state
+=
'
Text
'
if
(
data
.
resetText
==
null
)
$el
.
data
(
'
resetText
'
,
$el
[
val
]())
...
...
js/dropdown.js
View file @
3e7ca3bb
...
...
@@ -21,6 +21,40 @@
Dropdown
.
VERSION
=
'
3.3.4
'
function
getParent
(
$this
)
{
var
selector
=
$this
.
attr
(
'
data-target
'
)
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
/#
[
A-Za-z
]
/
.
test
(
selector
)
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
// strip for ie7
}
var
$parent
=
selector
&&
$
(
selector
)
return
$parent
&&
$parent
.
length
?
$parent
:
$this
.
parent
()
}
function
clearMenus
(
e
)
{
if
(
e
&&
e
.
which
===
3
)
return
$
(
backdrop
).
remove
()
$
(
toggle
).
each
(
function
()
{
var
$this
=
$
(
this
)
var
$parent
=
getParent
(
$this
)
var
relatedTarget
=
{
relatedTarget
:
this
}
if
(
!
$parent
.
hasClass
(
'
open
'
))
return
if
(
e
&&
e
.
type
==
'
click
'
&&
/input|textarea/i
.
test
(
e
.
target
.
tagName
)
&&
$
.
contains
(
$parent
[
0
],
e
.
target
))
return
$parent
.
trigger
(
e
=
$
.
Event
(
'
hide.bs.dropdown
'
,
relatedTarget
))
if
(
e
.
isDefaultPrevented
())
return
$this
.
attr
(
'
aria-expanded
'
,
'
false
'
)
$parent
.
removeClass
(
'
open
'
).
trigger
(
'
hidden.bs.dropdown
'
,
relatedTarget
)
})
}
Dropdown
.
prototype
.
toggle
=
function
(
e
)
{
var
$this
=
$
(
this
)
...
...
@@ -70,7 +104,7 @@
var
$parent
=
getParent
(
$this
)
var
isActive
=
$parent
.
hasClass
(
'
open
'
)
if
(
(
!
isActive
&&
e
.
which
!=
27
)
||
(
isActive
&&
e
.
which
==
27
)
)
{
if
(
!
isActive
&&
e
.
which
!=
27
||
isActive
&&
e
.
which
==
27
)
{
if
(
e
.
which
==
27
)
$parent
.
find
(
toggle
).
trigger
(
'
focus
'
)
return
$this
.
trigger
(
'
click
'
)
}
...
...
@@ -82,47 +116,13 @@
var
index
=
$items
.
index
(
e
.
target
)
if
(
e
.
which
==
38
&&
index
>
0
)
index
--
// up
if
(
e
.
which
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
if
(
!~
index
)
index
=
0
if
(
e
.
which
==
38
&&
index
>
0
)
index
--
// up
if
(
e
.
which
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
if
(
!~
index
)
index
=
0
$items
.
eq
(
index
).
trigger
(
'
focus
'
)
}
function
clearMenus
(
e
)
{
if
(
e
&&
e
.
which
===
3
)
return
$
(
backdrop
).
remove
()
$
(
toggle
).
each
(
function
()
{
var
$this
=
$
(
this
)
var
$parent
=
getParent
(
$this
)
var
relatedTarget
=
{
relatedTarget
:
this
}
if
(
!
$parent
.
hasClass
(
'
open
'
))
return
if
(
e
&&
e
.
type
==
'
click
'
&&
/input|textarea/i
.
test
(
e
.
target
.
tagName
)
&&
$
.
contains
(
$parent
[
0
],
e
.
target
))
return
$parent
.
trigger
(
e
=
$
.
Event
(
'
hide.bs.dropdown
'
,
relatedTarget
))
if
(
e
.
isDefaultPrevented
())
return
$this
.
attr
(
'
aria-expanded
'
,
'
false
'
)
$parent
.
removeClass
(
'
open
'
).
trigger
(
'
hidden.bs.dropdown
'
,
relatedTarget
)
})
}
function
getParent
(
$this
)
{
var
selector
=
$this
.
attr
(
'
data-target
'
)
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
/#
[
A-Za-z
]
/
.
test
(
selector
)
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
// strip for ie7
}
var
$parent
=
selector
&&
$
(
selector
)
return
$parent
&&
$parent
.
length
?
$parent
:
$this
.
parent
()
}
// DROPDOWN PLUGIN DEFINITION
// ==========================
...
...
js/tab.js
View file @
3e7ca3bb
...
...
@@ -65,7 +65,7 @@
var
$active
=
container
.
find
(
'
> .active
'
)
var
transition
=
callback
&&
$
.
support
.
transition
&&
(
(
$active
.
length
&&
$active
.
hasClass
(
'
fade
'
)
)
||
!!
container
.
find
(
'
> .fade
'
).
length
)
&&
(
$active
.
length
&&
$active
.
hasClass
(
'
fade
'
)
||
!!
container
.
find
(
'
> .fade
'
).
length
)
function
next
()
{
$active
...
...
js/tooltip.js
View file @
3e7ca3bb
...
...
@@ -239,8 +239,8 @@
if
(
isNaN
(
marginTop
))
marginTop
=
0
if
(
isNaN
(
marginLeft
))
marginLeft
=
0
offset
.
top
=
offset
.
top
+
marginTop
offset
.
left
=
offset
.
left
+
marginLeft
offset
.
top
+=
marginTop
offset
.
left
+=
marginLeft
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
...
...
@@ -322,7 +322,7 @@
Tooltip
.
prototype
.
fixTitle
=
function
()
{
var
$e
=
this
.
$element
if
(
$e
.
attr
(
'
title
'
)
||
typeof
(
$e
.
attr
(
'
data-original-title
'
)
)
!=
'
string
'
)
{
if
(
$e
.
attr
(
'
title
'
)
||
typeof
$e
.
attr
(
'
data-original-title
'
)
!=
'
string
'
)
{
$e
.
attr
(
'
data-original-title
'
,
$e
.
attr
(
'
title
'
)
||
''
).
attr
(
'
title
'
,
''
)
}
}
...
...
package.js
View file @
3e7ca3bb
...
...
@@ -17,6 +17,6 @@ Package.onUse(function (api) {
'
dist/fonts/glyphicons-halflings-regular.woff
'
,
'
dist/fonts/glyphicons-halflings-regular.woff2
'
,
'
dist/css/bootstrap.css
'
,
'
dist/js/bootstrap.js
'
,
'
dist/js/bootstrap.js
'
],
'
client
'
);
});
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