mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-24 03:40:10 +00:00
Merge branch 'master' of https://github.com/twbs/bootstrap into list_group_buttons
This commit is contained in:
commit
407e8dc9d8
@ -66,7 +66,7 @@ Guidelines for bug reports:
|
||||
latest `master` or development branch in the repository.
|
||||
|
||||
3. **Isolate the problem** — ideally create a [reduced test
|
||||
case](http://css-tricks.com/6263-reduced-test-cases/) and a live example.
|
||||
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||
[This JS Bin](http://jsbin.com/lefey/1/edit?html,output) is a helpful template.
|
||||
|
||||
|
||||
|
36
Gruntfile.js
36
Gruntfile.js
@ -63,7 +63,7 @@ module.exports = function (grunt) {
|
||||
options: {
|
||||
jshintrc: 'grunt/.jshintrc'
|
||||
},
|
||||
src: ['Gruntfile.js', 'grunt/*.js']
|
||||
src: ['Gruntfile.js', 'package.js', 'grunt/*.js']
|
||||
},
|
||||
core: {
|
||||
src: 'js/*.js'
|
||||
@ -126,6 +126,10 @@ module.exports = function (grunt) {
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
compress: {
|
||||
warnings: false
|
||||
},
|
||||
mangle: true,
|
||||
preserveComments: 'some'
|
||||
},
|
||||
core: {
|
||||
@ -317,6 +321,26 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
htmlmin: {
|
||||
dist: {
|
||||
options: {
|
||||
collapseWhitespace: true,
|
||||
conservativeCollapse: true,
|
||||
minifyCSS: true,
|
||||
minifyJS: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true
|
||||
},
|
||||
expand: true,
|
||||
cwd: '_gh_pages',
|
||||
dest: '_gh_pages',
|
||||
src: [
|
||||
'**/*.html',
|
||||
'!examples/**/*.html'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
jade: {
|
||||
options: {
|
||||
pretty: true,
|
||||
@ -365,6 +389,14 @@ module.exports = function (grunt) {
|
||||
return old ? RegExp.quote(old) : old;
|
||||
})(),
|
||||
replacement: grunt.option('newver'),
|
||||
exclude: [
|
||||
'dist/fonts',
|
||||
'docs/assets',
|
||||
'fonts',
|
||||
'js/tests/vendor',
|
||||
'node_modules',
|
||||
'test-infra'
|
||||
],
|
||||
recursive: true
|
||||
}
|
||||
},
|
||||
@ -491,7 +523,7 @@ module.exports = function (grunt) {
|
||||
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']);
|
||||
grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-glyphicons-data', 'build-customizer']);
|
||||
|
||||
grunt.registerTask('prep-release', ['jekyll:github', 'compress']);
|
||||
grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github', 'htmlmin', 'compress']);
|
||||
|
||||
// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
|
||||
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
|
||||
|
@ -1,4 +1,5 @@
|
||||
# [Bootstrap](http://getbootstrap.com)
|
||||
[](https://bootstrap-slack.herokuapp.com)
|
||||

|
||||
[](https://www.npmjs.com/package/bootstrap)
|
||||
[](https://travis-ci.org/twbs/bootstrap)
|
||||
@ -100,10 +101,11 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
|
||||
|
||||
## Community
|
||||
|
||||
Keep track of development and community news.
|
||||
Get updates on Bootstrap's development and chat with the project maintainers and community members.
|
||||
|
||||
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
|
||||
- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
|
||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
|
||||
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
||||
|
11
bower.json
11
bower.json
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "bootstrap",
|
||||
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
|
||||
"version": "3.3.4",
|
||||
"keywords": [
|
||||
"css",
|
||||
"js",
|
||||
@ -13,15 +12,11 @@
|
||||
"web"
|
||||
],
|
||||
"homepage": "http://getbootstrap.com",
|
||||
"license": "MIT",
|
||||
"moduleType": "globals",
|
||||
"main": [
|
||||
"less/bootstrap.less",
|
||||
"dist/css/bootstrap.css",
|
||||
"dist/js/bootstrap.js",
|
||||
"dist/fonts/glyphicons-halflings-regular.eot",
|
||||
"dist/fonts/glyphicons-halflings-regular.svg",
|
||||
"dist/fonts/glyphicons-halflings-regular.ttf",
|
||||
"dist/fonts/glyphicons-halflings-regular.woff",
|
||||
"dist/fonts/glyphicons-halflings-regular.woff2"
|
||||
"dist/js/bootstrap.js"
|
||||
],
|
||||
"ignore": [
|
||||
"/.*",
|
||||
|
@ -29,6 +29,27 @@
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-primary.disabled,
|
||||
.btn-success.disabled,
|
||||
.btn-info.disabled,
|
||||
.btn-warning.disabled,
|
||||
.btn-danger.disabled,
|
||||
.btn-default[disabled],
|
||||
.btn-primary[disabled],
|
||||
.btn-success[disabled],
|
||||
.btn-info[disabled],
|
||||
.btn-warning[disabled],
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
fieldset[disabled] .btn-primary,
|
||||
fieldset[disabled] .btn-success,
|
||||
fieldset[disabled] .btn-info,
|
||||
fieldset[disabled] .btn-warning,
|
||||
fieldset[disabled] .btn-danger {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-default .badge,
|
||||
.btn-primary .badge,
|
||||
.btn-success .badge,
|
||||
@ -64,8 +85,23 @@
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-default:disabled,
|
||||
.btn-default[disabled] {
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled.focus,
|
||||
.btn-default[disabled].focus,
|
||||
fieldset[disabled] .btn-default.focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
background-image: none;
|
||||
}
|
||||
@ -90,8 +126,23 @@
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary.disabled,
|
||||
.btn-primary:disabled,
|
||||
.btn-primary[disabled] {
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled.focus,
|
||||
.btn-primary[disabled].focus,
|
||||
fieldset[disabled] .btn-primary.focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #265a88;
|
||||
background-image: none;
|
||||
}
|
||||
@ -116,8 +167,23 @@
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success.disabled,
|
||||
.btn-success:disabled,
|
||||
.btn-success[disabled] {
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled.focus,
|
||||
.btn-success[disabled].focus,
|
||||
fieldset[disabled] .btn-success.focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #419641;
|
||||
background-image: none;
|
||||
}
|
||||
@ -142,8 +208,23 @@
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info.disabled,
|
||||
.btn-info:disabled,
|
||||
.btn-info[disabled] {
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled.focus,
|
||||
.btn-info[disabled].focus,
|
||||
fieldset[disabled] .btn-info.focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
background-image: none;
|
||||
}
|
||||
@ -168,8 +249,23 @@
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning.disabled,
|
||||
.btn-warning:disabled,
|
||||
.btn-warning[disabled] {
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled.focus,
|
||||
.btn-warning[disabled].focus,
|
||||
fieldset[disabled] .btn-warning.focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
background-image: none;
|
||||
}
|
||||
@ -194,8 +290,23 @@
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger.disabled,
|
||||
.btn-danger:disabled,
|
||||
.btn-danger[disabled] {
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled.focus,
|
||||
.btn-danger[disabled].focus,
|
||||
fieldset[disabled] .btn-danger.focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
background-image: none;
|
||||
}
|
||||
|
2
dist/css/bootstrap-theme.css.map
vendored
2
dist/css/bootstrap-theme.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap-theme.min.css
vendored
2
dist/css/bootstrap-theme.min.css
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
@ -239,9 +239,6 @@ th {
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
select {
|
||||
background: #fff !important;
|
||||
}
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
@ -2739,7 +2736,7 @@ select[multiple].input-sm {
|
||||
.form-group-sm .form-control-static {
|
||||
height: 30px;
|
||||
min-height: 32px;
|
||||
padding: 5px 10px;
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@ -2776,7 +2773,7 @@ select[multiple].input-lg {
|
||||
.form-group-lg .form-control-static {
|
||||
height: 46px;
|
||||
min-height: 38px;
|
||||
padding: 10px 16px;
|
||||
padding: 11px 16px;
|
||||
font-size: 18px;
|
||||
line-height: 1.3333333;
|
||||
}
|
||||
@ -2799,13 +2796,15 @@ select[multiple].input-lg {
|
||||
pointer-events: none;
|
||||
}
|
||||
.input-lg + .form-control-feedback,
|
||||
.input-group-lg + .form-control-feedback {
|
||||
.input-group-lg + .form-control-feedback,
|
||||
.form-group-lg .form-control + .form-control-feedback {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
.input-sm + .form-control-feedback,
|
||||
.input-group-sm + .form-control-feedback {
|
||||
.input-group-sm + .form-control-feedback,
|
||||
.form-group-sm .form-control + .form-control-feedback {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
@ -2991,11 +2990,13 @@ select[multiple].input-lg {
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .form-group-lg .control-label {
|
||||
padding-top: 14.333333px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .form-group-sm .control-label {
|
||||
padding-top: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
@ -3559,6 +3560,7 @@ tbody.collapse.in {
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
border-top: 4px dashed;
|
||||
border-top: 4px solid\9;
|
||||
border-right: 4px solid transparent;
|
||||
border-left: 4px solid transparent;
|
||||
}
|
||||
@ -3723,6 +3725,7 @@ tbody.collapse.in {
|
||||
.btn-toolbar {
|
||||
margin-left: -5px;
|
||||
}
|
||||
.btn-toolbar .btn,
|
||||
.btn-toolbar .btn-group,
|
||||
.btn-toolbar .input-group {
|
||||
float: left;
|
||||
@ -4013,6 +4016,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
||||
}
|
||||
.input-group-btn:last-child > .btn,
|
||||
.input-group-btn:last-child > .btn-group {
|
||||
z-index: 2;
|
||||
margin-left: -1px;
|
||||
}
|
||||
.nav {
|
||||
@ -4788,6 +4792,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 3;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
@ -4960,7 +4965,7 @@ a.label:focus {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
vertical-align: middle;
|
||||
background-color: #777;
|
||||
border-radius: 10px;
|
||||
}
|
||||
@ -5247,6 +5252,9 @@ a.thumbnail.active {
|
||||
.media-object {
|
||||
display: block;
|
||||
}
|
||||
.media-object.img-thumbnail {
|
||||
max-width: none;
|
||||
}
|
||||
.media-right,
|
||||
.media > .pull-right {
|
||||
padding-left: 10px;
|
||||
@ -5506,6 +5514,10 @@ a.list-group-item-danger.active:focus {
|
||||
border-bottom-right-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.panel-heading + .list-group .list-group-item:first-child {
|
||||
border-top-width: 0;
|
||||
}
|
||||
@ -5987,10 +5999,23 @@ button.close {
|
||||
display: block;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1.4;
|
||||
line-height: 1.42857143;
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: normal;
|
||||
filter: alpha(opacity=0);
|
||||
opacity: 0;
|
||||
|
||||
line-break: auto;
|
||||
}
|
||||
.tooltip.in {
|
||||
filter: alpha(opacity=90);
|
||||
@ -6017,7 +6042,6 @@ button.close {
|
||||
padding: 3px 8px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background-color: #000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
@ -6094,9 +6118,18 @@ button.close {
|
||||
padding: 1px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1.42857143;
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: normal;
|
||||
background-color: #fff;
|
||||
-webkit-background-clip: padding-box;
|
||||
@ -6106,6 +6139,8 @@ button.close {
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
|
||||
|
||||
line-break: auto;
|
||||
}
|
||||
.popover.top {
|
||||
margin-top: -10px;
|
||||
@ -6233,8 +6268,8 @@ button.close {
|
||||
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
-webkit-perspective: 1000;
|
||||
perspective: 1000;
|
||||
-webkit-perspective: 1000px;
|
||||
perspective: 1000px;
|
||||
}
|
||||
.carousel-inner > .item.next,
|
||||
.carousel-inner > .item.active.right {
|
||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') {
|
||||
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]())
|
||||
|
||||
@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') {
|
||||
if ($parent.length) {
|
||||
var $input = this.$element.find('input')
|
||||
if ($input.prop('type') == 'radio') {
|
||||
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
||||
else $parent.find('.active').removeClass('active')
|
||||
if ($input.prop('checked')) changed = false
|
||||
if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
|
||||
}
|
||||
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
||||
} else {
|
||||
@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
Plugin.call($btn, 'toggle')
|
||||
e.preventDefault()
|
||||
if (!$(e.target).is('input[type="radio"]')) e.preventDefault()
|
||||
})
|
||||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
||||
@ -761,6 +761,40 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
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)
|
||||
|
||||
@ -810,7 +844,7 @@ if (typeof jQuery === 'undefined') {
|
||||
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')
|
||||
}
|
||||
@ -829,40 +863,6 @@ if (typeof jQuery === 'undefined') {
|
||||
$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
|
||||
// ==========================
|
||||
@ -900,8 +900,7 @@ if (typeof jQuery === 'undefined') {
|
||||
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
||||
|
||||
}(jQuery);
|
||||
|
||||
@ -1295,7 +1294,7 @@ if (typeof jQuery === 'undefined') {
|
||||
this.type = type
|
||||
this.$element = $(element)
|
||||
this.options = this.getOptions(options)
|
||||
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
||||
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
||||
|
||||
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
||||
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
||||
@ -1430,6 +1429,7 @@ if (typeof jQuery === 'undefined') {
|
||||
.data('bs.' + this.type, this)
|
||||
|
||||
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
||||
this.$element.trigger('inserted.bs.' + this.type)
|
||||
|
||||
var pos = this.getPosition()
|
||||
var actualWidth = $tip[0].offsetWidth
|
||||
@ -1437,13 +1437,12 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
if (autoPlace) {
|
||||
var orgPlacement = placement
|
||||
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
|
||||
var containerDim = this.getPosition($container)
|
||||
var viewportDim = this.getPosition(this.$viewport)
|
||||
|
||||
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
|
||||
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
|
||||
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
||||
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
||||
placement
|
||||
|
||||
$tip
|
||||
@ -1484,8 +1483,8 @@ if (typeof jQuery === 'undefined') {
|
||||
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
|
||||
@ -1567,7 +1566,7 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
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', '')
|
||||
}
|
||||
}
|
||||
@ -1622,7 +1621,7 @@ if (typeof jQuery === 'undefined') {
|
||||
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
||||
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
||||
delta.left = viewportDimensions.left - leftEdgeOffset
|
||||
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
|
||||
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
||||
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
||||
}
|
||||
}
|
||||
@ -1648,7 +1647,13 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
|
||||
Tooltip.prototype.tip = function () {
|
||||
return (this.$tip = this.$tip || $(this.options.template))
|
||||
if (!this.$tip) {
|
||||
this.$tip = $(this.options.template)
|
||||
if (this.$tip.length != 1) {
|
||||
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
||||
}
|
||||
}
|
||||
return this.$tip
|
||||
}
|
||||
|
||||
Tooltip.prototype.arrow = function () {
|
||||
@ -1685,6 +1690,12 @@ if (typeof jQuery === 'undefined') {
|
||||
clearTimeout(this.timeout)
|
||||
this.hide(function () {
|
||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||
if (that.$tip) {
|
||||
that.$tip.detach()
|
||||
}
|
||||
that.$tip = null
|
||||
that.$arrow = null
|
||||
that.$viewport = null
|
||||
})
|
||||
}
|
||||
|
||||
@ -2069,7 +2080,7 @@ if (typeof jQuery === 'undefined') {
|
||||
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
|
||||
|
5
dist/js/bootstrap.min.js
vendored
5
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -88,6 +88,16 @@
|
||||
origin: >
|
||||
Bootstrap#15832
|
||||
|
||||
-
|
||||
browser: >
|
||||
Chrome
|
||||
summary: >
|
||||
Focus ring of image map within a modal is displayed in the wrong location.
|
||||
upstream_bug: >
|
||||
Chromium#475128
|
||||
origin: >
|
||||
Bootstrap#16180
|
||||
|
||||
-
|
||||
browser: >
|
||||
Chrome
|
||||
@ -200,6 +210,16 @@
|
||||
origin: >
|
||||
Bootstrap#15832
|
||||
|
||||
-
|
||||
browser: >
|
||||
Safari (OS X)
|
||||
summary: >
|
||||
Focus ring of image map within a modal is displayed in the wrong location.
|
||||
upstream_bug: >
|
||||
WebKit#143527
|
||||
origin: >
|
||||
Bootstrap#16180
|
||||
|
||||
-
|
||||
browser: >
|
||||
Safari (iOS)
|
||||
|
@ -4,7 +4,7 @@
|
||||
<p class="lead">Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href="../javascript/#dropdowns">dropdown JavaScript plugin</a>.</p>
|
||||
|
||||
<h2 id="dropdowns-example">Example</h2>
|
||||
<p>Wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then add the menu's HTML. Dropdown menus can be changed to expand upwards (instead of downwards) by adding <code>.dropup</code> to the parent.</p>
|
||||
<p>Wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then add the menu's HTML.</p>
|
||||
<div class="bs-example" data-example-id="static-dropdown">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
|
||||
@ -17,17 +17,6 @@
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dropup clearfix">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-expanded="true">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<div class="dropdown">
|
||||
@ -42,9 +31,26 @@
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<p>Dropdown menus can be changed to expand upwards (instead of downwards) by adding <code>.dropup</code> to the parent.</p>
|
||||
<div class="bs-example" data-example-id="static-dropup">
|
||||
<div class="dropup clearfix">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-expanded="true">
|
||||
Dropup
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
|
||||
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<div class="dropup">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-expanded="true">
|
||||
Dropdown
|
||||
Dropup
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||
|
@ -164,7 +164,6 @@
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
<h2 id="affix-usage">Usage</h2>
|
||||
<p>Use the affix plugin via data attributes or manually with your own JavaScript. <strong class="text-danger">In both situations, you must provide CSS for the positioning and width of your affixed content.</strong></p>
|
||||
<p>Note: Do not use the affix plugin on an element contained in a relatively positioned element, such as a pulled or pushed column, due to a <a href="https://github.com/twbs/bootstrap/issues/12126">Safari rendering bug</a>.</p>
|
||||
|
||||
<h3>Positioning via CSS</h3>
|
||||
<p>The affix plugin toggles between three classes, each representing a particular state: <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code>. You must provide the styles, with the exception of <code>position: fixed;</code> on <code>.affix</code>, for these classes yourself (independent of this plugin) to handle the actual positions.</p>
|
||||
|
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img data-src="holder.js/900x500/auto/#555:#5555" alt="Third slide image">
|
||||
<img data-src="holder.js/900x500/auto/#555:#555" alt="Third slide image">
|
||||
<div class="carousel-caption">
|
||||
<h3>Third slide label</h3>
|
||||
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
|
||||
|
@ -233,10 +233,11 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
|
||||
</tr>
|
||||
<tr>
|
||||
<td>viewport</td>
|
||||
<td>string | object</td>
|
||||
<td>string | object | function</td>
|
||||
<td>{ selector: 'body', padding: 0 }</td>
|
||||
<td>
|
||||
<p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
|
||||
<p>If a function is given, it is called with the triggering element DOM node as its only argument. The <code>this</code> context is set to the popover instance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -293,6 +294,10 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
|
||||
<td>hidden.bs.popover</td>
|
||||
<td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inserted.bs.popover</td>
|
||||
<td>This event is fired after the <code>show.bs.popover</code> event when the popover template has been added to the DOM.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
@ -199,10 +199,11 @@ $('#example').tooltip(options)
|
||||
</tr>
|
||||
<tr>
|
||||
<td>viewport</td>
|
||||
<td>string | object</td>
|
||||
<td>string | object | function</td>
|
||||
<td>{ selector: 'body', padding: 0 }</td>
|
||||
<td>
|
||||
<p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
|
||||
<p>If a function is given, it is called with the triggering element DOM node as its only argument. The <code>this</code> context is set to the tooltip instance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -260,6 +261,10 @@ $('#example').tooltip(options)
|
||||
<td>hidden.bs.tooltip</td>
|
||||
<td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inserted.bs.tooltip</td>
|
||||
<td>This event is fired after the <code>show.bs.tooltip</code> event when the tooltip template has been added to the DOM.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
4
docs/assets/css/docs.min.css
vendored
4
docs/assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* Bootstrap Docs (http://getbootstrap.com)
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see http://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
@ -236,7 +236,7 @@ h4 code {
|
||||
.bs-docs-masthead,
|
||||
.bs-docs-header {
|
||||
position: relative;
|
||||
padding: 30px 15px;
|
||||
padding: 30px 0;
|
||||
color: #cdbfe3;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 rgba(0,0,0,.1);
|
||||
|
Binary file not shown.
91
docs/assets/js/customize.min.js
vendored
91
docs/assets/js/customize.min.js
vendored
File diff suppressed because one or more lines are too long
28
docs/assets/js/docs.min.js
vendored
28
docs/assets/js/docs.min.js
vendored
File diff suppressed because one or more lines are too long
4
docs/assets/js/raw-files.min.js
vendored
4
docs/assets/js/raw-files.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
|
||||
/*!
|
||||
* JavaScript for Bootstrap's docs (http://getbootstrap.com)
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see http://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
@ -127,7 +127,7 @@
|
||||
|
||||
// Config ZeroClipboard
|
||||
ZeroClipboard.config({
|
||||
moviePath: '/assets/flash/ZeroClipboard.swf',
|
||||
swfPath: '/assets/flash/ZeroClipboard.swf',
|
||||
hoverClass: 'btn-clipboard-hover'
|
||||
})
|
||||
|
||||
@ -136,25 +136,25 @@
|
||||
var btnHtml = '<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>'
|
||||
$(this).before(btnHtml)
|
||||
})
|
||||
|
||||
var zeroClipboard = new ZeroClipboard($('.btn-clipboard'))
|
||||
var htmlBridge = $('#global-zeroclipboard-html-bridge')
|
||||
|
||||
// Handlers for ZeroClipboard
|
||||
zeroClipboard.on('load', function () {
|
||||
zeroClipboard.on('ready', function () {
|
||||
htmlBridge
|
||||
.data('placement', 'top')
|
||||
.attr('title', 'Copy to clipboard')
|
||||
.tooltip()
|
||||
})
|
||||
|
||||
// Copy to clipboard
|
||||
zeroClipboard.on('dataRequested', function (client) {
|
||||
var highlight = $(this).parent().nextAll('.highlight').first()
|
||||
client.setText(highlight.text())
|
||||
zeroClipboard.on('copy', function (event) {
|
||||
var highlight = $(event.target).parent().nextAll('.highlight').first()
|
||||
event.clipboardData.setData('text/plain', highlight.text())
|
||||
})
|
||||
|
||||
// Notify copy success and reset tooltip title
|
||||
zeroClipboard.on('complete', function () {
|
||||
zeroClipboard.on('aftercopy', function () {
|
||||
htmlBridge
|
||||
.attr('title', 'Copied!')
|
||||
.tooltip('fixTitle')
|
||||
@ -162,13 +162,12 @@
|
||||
.attr('title', 'Copy to clipboard')
|
||||
.tooltip('fixTitle')
|
||||
})
|
||||
})
|
||||
|
||||
// Notify copy failure
|
||||
zeroClipboard.on('noflash wrongflash', function () {
|
||||
htmlBridge
|
||||
.attr('title', 'Flash required')
|
||||
.tooltip('fixTitle')
|
||||
.tooltip('show')
|
||||
// Hide copy button on error
|
||||
zeroClipboard.on('error', function () {
|
||||
$('.zero-clipboard').remove()
|
||||
ZeroClipboard.destroy()
|
||||
})
|
||||
|
||||
})
|
||||
@ -177,5 +176,5 @@
|
||||
|
||||
;(function () {
|
||||
'use strict';
|
||||
addAnchors('.bs-docs-container h1, .bs-docs-container h2, .bs-docs-container h3, .bs-docs-container h4, .bs-docs-container h5');
|
||||
addAnchors('.bs-docs-container > h1, .bs-docs-container > h2, .bs-docs-container > h3, .bs-docs-container > h4, .bs-docs-container > h5');
|
||||
})();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* Bootstrap Customizer (http://getbootstrap.com/customize/)
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see http://creativecommons.org/licenses/by/3.0/.
|
||||
@ -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)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
16
docs/assets/js/vendor/Blob.js
vendored
16
docs/assets/js/vendor/Blob.js
vendored
@ -189,9 +189,23 @@
|
||||
var builder = new BlobBuilder();
|
||||
if (blobParts) {
|
||||
for (var i = 0, len = blobParts.length; i < len; i++) {
|
||||
if (Uint8Array && blobParts[i] instanceof Uint8Array) {
|
||||
builder.append(blobParts[i].buffer);
|
||||
}
|
||||
else {
|
||||
builder.append(blobParts[i]);
|
||||
}
|
||||
}
|
||||
return builder.getBlob(type);
|
||||
}
|
||||
var blob = builder.getBlob(type);
|
||||
if (!blob.slice && blob.webkitSlice) {
|
||||
blob.slice = blob.webkitSlice;
|
||||
}
|
||||
return blob;
|
||||
};
|
||||
|
||||
var getPrototypeOf = Object.getPrototypeOf || function(object) {
|
||||
return object.__proto__;
|
||||
};
|
||||
view.Blob.prototype = getPrototypeOf(new view.Blob());
|
||||
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
|
||||
|
6
docs/assets/js/vendor/FileSaver.js
vendored
6
docs/assets/js/vendor/FileSaver.js
vendored
@ -1,6 +1,6 @@
|
||||
/* FileSaver.js
|
||||
* A saveAs() FileSaver implementation.
|
||||
* 2015-01-04
|
||||
* 2015-03-04
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
* License: X11/MIT
|
||||
@ -135,6 +135,10 @@ var saveAs = saveAs
|
||||
revoke(object_url);
|
||||
return;
|
||||
}
|
||||
// prepend BOM for UTF-8 XML and text/plain types
|
||||
if (/^\s*(?:text\/(?:plain|xml)|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
|
||||
blob = new Blob(["\ufeff", blob], {type: blob.type});
|
||||
}
|
||||
// Object and web filesystem URLs have a problem saving in Google Chrome when
|
||||
// viewed in a tab, so I force save with application/octet-stream
|
||||
// http://code.google.com/p/chromium/issues/detail?id=91158
|
||||
|
16
docs/assets/js/vendor/ZeroClipboard.min.js
vendored
16
docs/assets/js/vendor/ZeroClipboard.min.js
vendored
File diff suppressed because one or more lines are too long
4092
docs/assets/js/vendor/autoprefixer.js
vendored
4092
docs/assets/js/vendor/autoprefixer.js
vendored
File diff suppressed because one or more lines are too long
12
docs/assets/js/vendor/holder.js
vendored
12
docs/assets/js/vendor/holder.js
vendored
File diff suppressed because one or more lines are too long
12
docs/assets/js/vendor/holder.min.js
vendored
Normal file
12
docs/assets/js/vendor/holder.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
docs/assets/js/vendor/jszip.min.js
vendored
6
docs/assets/js/vendor/jszip.min.js
vendored
File diff suppressed because one or more lines are too long
15
docs/assets/js/vendor/uglify.min.js
vendored
15
docs/assets/js/vendor/uglify.min.js
vendored
File diff suppressed because one or more lines are too long
@ -29,6 +29,27 @@
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-primary.disabled,
|
||||
.btn-success.disabled,
|
||||
.btn-info.disabled,
|
||||
.btn-warning.disabled,
|
||||
.btn-danger.disabled,
|
||||
.btn-default[disabled],
|
||||
.btn-primary[disabled],
|
||||
.btn-success[disabled],
|
||||
.btn-info[disabled],
|
||||
.btn-warning[disabled],
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
fieldset[disabled] .btn-primary,
|
||||
fieldset[disabled] .btn-success,
|
||||
fieldset[disabled] .btn-info,
|
||||
fieldset[disabled] .btn-warning,
|
||||
fieldset[disabled] .btn-danger {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-default .badge,
|
||||
.btn-primary .badge,
|
||||
.btn-success .badge,
|
||||
@ -64,8 +85,23 @@
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-default:disabled,
|
||||
.btn-default[disabled] {
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled.focus,
|
||||
.btn-default[disabled].focus,
|
||||
fieldset[disabled] .btn-default.focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
background-image: none;
|
||||
}
|
||||
@ -90,8 +126,23 @@
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary.disabled,
|
||||
.btn-primary:disabled,
|
||||
.btn-primary[disabled] {
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled.focus,
|
||||
.btn-primary[disabled].focus,
|
||||
fieldset[disabled] .btn-primary.focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #265a88;
|
||||
background-image: none;
|
||||
}
|
||||
@ -116,8 +167,23 @@
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success.disabled,
|
||||
.btn-success:disabled,
|
||||
.btn-success[disabled] {
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled.focus,
|
||||
.btn-success[disabled].focus,
|
||||
fieldset[disabled] .btn-success.focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #419641;
|
||||
background-image: none;
|
||||
}
|
||||
@ -142,8 +208,23 @@
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info.disabled,
|
||||
.btn-info:disabled,
|
||||
.btn-info[disabled] {
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled.focus,
|
||||
.btn-info[disabled].focus,
|
||||
fieldset[disabled] .btn-info.focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
background-image: none;
|
||||
}
|
||||
@ -168,8 +249,23 @@
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning.disabled,
|
||||
.btn-warning:disabled,
|
||||
.btn-warning[disabled] {
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled.focus,
|
||||
.btn-warning[disabled].focus,
|
||||
fieldset[disabled] .btn-warning.focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
background-image: none;
|
||||
}
|
||||
@ -194,8 +290,23 @@
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger.disabled,
|
||||
.btn-danger:disabled,
|
||||
.btn-danger[disabled] {
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled.focus,
|
||||
.btn-danger[disabled].focus,
|
||||
fieldset[disabled] .btn-danger.focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
background-image: none;
|
||||
}
|
||||
|
2
docs/dist/css/bootstrap-theme.css.map
vendored
2
docs/dist/css/bootstrap-theme.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap-theme.min.css
vendored
2
docs/dist/css/bootstrap-theme.min.css
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
@ -239,9 +239,6 @@ th {
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
select {
|
||||
background: #fff !important;
|
||||
}
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
@ -2739,7 +2736,7 @@ select[multiple].input-sm {
|
||||
.form-group-sm .form-control-static {
|
||||
height: 30px;
|
||||
min-height: 32px;
|
||||
padding: 5px 10px;
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@ -2776,7 +2773,7 @@ select[multiple].input-lg {
|
||||
.form-group-lg .form-control-static {
|
||||
height: 46px;
|
||||
min-height: 38px;
|
||||
padding: 10px 16px;
|
||||
padding: 11px 16px;
|
||||
font-size: 18px;
|
||||
line-height: 1.3333333;
|
||||
}
|
||||
@ -2799,13 +2796,15 @@ select[multiple].input-lg {
|
||||
pointer-events: none;
|
||||
}
|
||||
.input-lg + .form-control-feedback,
|
||||
.input-group-lg + .form-control-feedback {
|
||||
.input-group-lg + .form-control-feedback,
|
||||
.form-group-lg .form-control + .form-control-feedback {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
.input-sm + .form-control-feedback,
|
||||
.input-group-sm + .form-control-feedback {
|
||||
.input-group-sm + .form-control-feedback,
|
||||
.form-group-sm .form-control + .form-control-feedback {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
@ -2991,11 +2990,13 @@ select[multiple].input-lg {
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .form-group-lg .control-label {
|
||||
padding-top: 14.333333px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .form-group-sm .control-label {
|
||||
padding-top: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
@ -3559,6 +3560,7 @@ tbody.collapse.in {
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
border-top: 4px dashed;
|
||||
border-top: 4px solid\9;
|
||||
border-right: 4px solid transparent;
|
||||
border-left: 4px solid transparent;
|
||||
}
|
||||
@ -3723,6 +3725,7 @@ tbody.collapse.in {
|
||||
.btn-toolbar {
|
||||
margin-left: -5px;
|
||||
}
|
||||
.btn-toolbar .btn,
|
||||
.btn-toolbar .btn-group,
|
||||
.btn-toolbar .input-group {
|
||||
float: left;
|
||||
@ -4013,6 +4016,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
||||
}
|
||||
.input-group-btn:last-child > .btn,
|
||||
.input-group-btn:last-child > .btn-group {
|
||||
z-index: 2;
|
||||
margin-left: -1px;
|
||||
}
|
||||
.nav {
|
||||
@ -4788,6 +4792,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 3;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
@ -4960,7 +4965,7 @@ a.label:focus {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
vertical-align: middle;
|
||||
background-color: #777;
|
||||
border-radius: 10px;
|
||||
}
|
||||
@ -5247,6 +5252,9 @@ a.thumbnail.active {
|
||||
.media-object {
|
||||
display: block;
|
||||
}
|
||||
.media-object.img-thumbnail {
|
||||
max-width: none;
|
||||
}
|
||||
.media-right,
|
||||
.media > .pull-right {
|
||||
padding-left: 10px;
|
||||
@ -5506,6 +5514,10 @@ a.list-group-item-danger.active:focus {
|
||||
border-bottom-right-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.panel-heading + .list-group .list-group-item:first-child {
|
||||
border-top-width: 0;
|
||||
}
|
||||
@ -5987,10 +5999,23 @@ button.close {
|
||||
display: block;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1.4;
|
||||
line-height: 1.42857143;
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: normal;
|
||||
filter: alpha(opacity=0);
|
||||
opacity: 0;
|
||||
|
||||
line-break: auto;
|
||||
}
|
||||
.tooltip.in {
|
||||
filter: alpha(opacity=90);
|
||||
@ -6017,7 +6042,6 @@ button.close {
|
||||
padding: 3px 8px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background-color: #000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
@ -6094,9 +6118,18 @@ button.close {
|
||||
padding: 1px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1.42857143;
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: normal;
|
||||
background-color: #fff;
|
||||
-webkit-background-clip: padding-box;
|
||||
@ -6106,6 +6139,8 @@ button.close {
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
|
||||
|
||||
line-break: auto;
|
||||
}
|
||||
.popover.top {
|
||||
margin-top: -10px;
|
||||
@ -6233,8 +6268,8 @@ button.close {
|
||||
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
-webkit-perspective: 1000;
|
||||
perspective: 1000;
|
||||
-webkit-perspective: 1000px;
|
||||
perspective: 1000px;
|
||||
}
|
||||
.carousel-inner > .item.next,
|
||||
.carousel-inner > .item.active.right {
|
||||
|
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') {
|
||||
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]())
|
||||
|
||||
@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') {
|
||||
if ($parent.length) {
|
||||
var $input = this.$element.find('input')
|
||||
if ($input.prop('type') == 'radio') {
|
||||
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
||||
else $parent.find('.active').removeClass('active')
|
||||
if ($input.prop('checked')) changed = false
|
||||
if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
|
||||
}
|
||||
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
||||
} else {
|
||||
@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
Plugin.call($btn, 'toggle')
|
||||
e.preventDefault()
|
||||
if (!$(e.target).is('input[type="radio"]')) e.preventDefault()
|
||||
})
|
||||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
||||
@ -761,6 +761,40 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
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)
|
||||
|
||||
@ -810,7 +844,7 @@ if (typeof jQuery === 'undefined') {
|
||||
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')
|
||||
}
|
||||
@ -829,40 +863,6 @@ if (typeof jQuery === 'undefined') {
|
||||
$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
|
||||
// ==========================
|
||||
@ -900,8 +900,7 @@ if (typeof jQuery === 'undefined') {
|
||||
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
||||
|
||||
}(jQuery);
|
||||
|
||||
@ -1295,7 +1294,7 @@ if (typeof jQuery === 'undefined') {
|
||||
this.type = type
|
||||
this.$element = $(element)
|
||||
this.options = this.getOptions(options)
|
||||
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
||||
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
||||
|
||||
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
||||
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
||||
@ -1430,6 +1429,7 @@ if (typeof jQuery === 'undefined') {
|
||||
.data('bs.' + this.type, this)
|
||||
|
||||
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
||||
this.$element.trigger('inserted.bs.' + this.type)
|
||||
|
||||
var pos = this.getPosition()
|
||||
var actualWidth = $tip[0].offsetWidth
|
||||
@ -1437,13 +1437,12 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
if (autoPlace) {
|
||||
var orgPlacement = placement
|
||||
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
|
||||
var containerDim = this.getPosition($container)
|
||||
var viewportDim = this.getPosition(this.$viewport)
|
||||
|
||||
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
|
||||
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
|
||||
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
||||
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
||||
placement
|
||||
|
||||
$tip
|
||||
@ -1484,8 +1483,8 @@ if (typeof jQuery === 'undefined') {
|
||||
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
|
||||
@ -1567,7 +1566,7 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
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', '')
|
||||
}
|
||||
}
|
||||
@ -1622,7 +1621,7 @@ if (typeof jQuery === 'undefined') {
|
||||
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
||||
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
||||
delta.left = viewportDimensions.left - leftEdgeOffset
|
||||
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
|
||||
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
||||
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
||||
}
|
||||
}
|
||||
@ -1648,7 +1647,13 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
|
||||
Tooltip.prototype.tip = function () {
|
||||
return (this.$tip = this.$tip || $(this.options.template))
|
||||
if (!this.$tip) {
|
||||
this.$tip = $(this.options.template)
|
||||
if (this.$tip.length != 1) {
|
||||
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
||||
}
|
||||
}
|
||||
return this.$tip
|
||||
}
|
||||
|
||||
Tooltip.prototype.arrow = function () {
|
||||
@ -1685,6 +1690,12 @@ if (typeof jQuery === 'undefined') {
|
||||
clearTimeout(this.timeout)
|
||||
this.hide(function () {
|
||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||
if (that.$tip) {
|
||||
that.$tip.detach()
|
||||
}
|
||||
that.$tip = null
|
||||
that.$arrow = null
|
||||
that.$viewport = null
|
||||
})
|
||||
}
|
||||
|
||||
@ -2069,7 +2080,7 @@ if (typeof jQuery === 'undefined') {
|
||||
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
|
||||
|
5
docs/dist/js/bootstrap.min.js
vendored
5
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -209,7 +209,7 @@
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script src="../../dist/js/bootstrap.min.js"></script>
|
||||
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
|
||||
<script src="../../assets/js/vendor/holder.js"></script>
|
||||
<script src="../../assets/js/vendor/holder.min.js"></script>
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
|
||||
</body>
|
||||
|
@ -241,7 +241,7 @@
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script src="../../dist/js/bootstrap.min.js"></script>
|
||||
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
|
||||
<script src="../../assets/js/vendor/holder.js"></script>
|
||||
<script src="../../assets/js/vendor/holder.min.js"></script>
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
|
||||
</body>
|
||||
|
@ -202,3 +202,61 @@ body,
|
||||
.navbar-form .has-feedback .form-control-feedback {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Undo inline form compaction on small screens */
|
||||
.form-inline .form-group {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-inline .form-control {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-inline .form-control-static {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.form-inline .input-group {
|
||||
display: inline-table;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.form-inline .input-group .input-group-addon,
|
||||
.form-inline .input-group .input-group-btn,
|
||||
.form-inline .input-group .form-control {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.form-inline .input-group > .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-inline .control-label {
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-inline .radio,
|
||||
.form-inline .checkbox {
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.form-inline .radio label,
|
||||
.form-inline .checkbox label {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.form-inline .radio input[type="radio"],
|
||||
.form-inline .checkbox input[type="checkbox"] {
|
||||
position: relative;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.form-inline .has-feedback .form-control-feedback {
|
||||
top: 0;
|
||||
}
|
||||
|
@ -1,4 +1,12 @@
|
||||
/*!
|
||||
* Bootstrap Grunt task for the CommonJS module generation
|
||||
* http://getbootstrap.com
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
@ -15,8 +23,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.');
|
||||
|
@ -1,10 +1,12 @@
|
||||
/*!
|
||||
* Bootstrap Grunt task for Glyphicons data generation
|
||||
* http://getbootstrap.com
|
||||
* Copyright 2014 Twitter, Inc.
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
module.exports = function generateGlyphiconsData(grunt) {
|
||||
@ -33,8 +35,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.');
|
||||
|
@ -1,9 +1,10 @@
|
||||
/*!
|
||||
* Bootstrap Grunt task for parsing Less docstrings
|
||||
* http://getbootstrap.com
|
||||
* Copyright 2014 Twitter, Inc.
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var Markdown = require('markdown-it');
|
||||
@ -121,7 +122,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 +169,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 +185,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 = [];
|
||||
}
|
||||
|
@ -1,28 +1,27 @@
|
||||
/*!
|
||||
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer
|
||||
* http://getbootstrap.com
|
||||
* Copyright 2014 Twitter, Inc.
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* 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.');
|
||||
|
@ -11,7 +11,7 @@
|
||||
"../assets/js/src/customizer.js"
|
||||
],
|
||||
"docsJs": [
|
||||
"../assets/js/vendor/holder.js",
|
||||
"../assets/js/vendor/holder.min.js",
|
||||
"../assets/js/vendor/ZeroClipboard.min.js",
|
||||
"../assets/js/vendor/anchor.js",
|
||||
"../assets/js/src/application.js"
|
||||
|
@ -57,7 +57,7 @@
|
||||
{
|
||||
browserName: "iphone",
|
||||
platform: "OS X 10.10",
|
||||
version: "8.1"
|
||||
version: "8.2"
|
||||
},
|
||||
|
||||
# iOS Chrome not currently supported by Sauce Labs
|
||||
|
@ -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]())
|
||||
|
||||
@ -56,8 +56,8 @@
|
||||
if ($parent.length) {
|
||||
var $input = this.$element.find('input')
|
||||
if ($input.prop('type') == 'radio') {
|
||||
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
||||
else $parent.find('.active').removeClass('active')
|
||||
if ($input.prop('checked')) changed = false
|
||||
if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
|
||||
}
|
||||
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
||||
} else {
|
||||
@ -107,7 +107,7 @@
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
Plugin.call($btn, 'toggle')
|
||||
e.preventDefault()
|
||||
if (!$(e.target).is('input[type="radio"]')) e.preventDefault()
|
||||
})
|
||||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
||||
|
@ -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')
|
||||
}
|
||||
@ -89,40 +123,6 @@
|
||||
$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
|
||||
// ==========================
|
||||
@ -160,7 +160,6 @@
|
||||
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
|
||||
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
||||
|
||||
}(jQuery);
|
||||
|
@ -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
|
||||
|
@ -167,13 +167,13 @@ $(function () {
|
||||
assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked')
|
||||
$btn2.find('input').trigger('click')
|
||||
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
|
||||
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is checked')
|
||||
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked')
|
||||
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
|
||||
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
|
||||
|
||||
$btn2.find('input').trigger('click') // clicking an already checked radio should not un-check it
|
||||
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
|
||||
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is checked')
|
||||
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked')
|
||||
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
|
||||
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
|
||||
})
|
||||
|
@ -259,4 +259,32 @@ $(function () {
|
||||
assert.strictEqual($popover.data('bs.popover'), undefined, 'should not initialize the popover')
|
||||
})
|
||||
|
||||
QUnit.test('should throw an error when template contains multiple top-level elements', function (assert) {
|
||||
assert.expect(1)
|
||||
assert.throws(function () {
|
||||
$('<span data-toggle="popover" data-title="some title" data-content="some content">some text</span>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapPopover({ template: '<div>Foo</div><div>Bar</div>' })
|
||||
.bootstrapPopover('show')
|
||||
}, new Error('popover `template` option must consist of exactly 1 top-level element!'))
|
||||
})
|
||||
|
||||
QUnit.test('should fire inserted event', function (assert) {
|
||||
assert.expect(2)
|
||||
var done = assert.async()
|
||||
|
||||
$('<a href="#">@Johann-S</a>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.on('inserted.bs.popover', function () {
|
||||
assert.notEqual($('.popover').length, 0, 'popover was inserted')
|
||||
assert.ok(true, 'inserted event fired')
|
||||
done()
|
||||
})
|
||||
.bootstrapPopover({
|
||||
title: 'Test',
|
||||
content: 'Test'
|
||||
})
|
||||
.bootstrapPopover('show')
|
||||
})
|
||||
|
||||
})
|
||||
|
@ -139,6 +139,20 @@ $(function () {
|
||||
.bootstrapTooltip('show')
|
||||
})
|
||||
|
||||
QUnit.test('should fire inserted event', function (assert) {
|
||||
assert.expect(2)
|
||||
var done = assert.async()
|
||||
|
||||
$('<div title="tooltip title"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.on('inserted.bs.tooltip', function () {
|
||||
assert.notEqual($('.tooltip').length, 0, 'tooltip was inserted')
|
||||
assert.ok(true, 'inserted event fired')
|
||||
done()
|
||||
})
|
||||
.bootstrapTooltip('show')
|
||||
})
|
||||
|
||||
QUnit.test('should fire shown event', function (assert) {
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
@ -362,23 +376,19 @@ $(function () {
|
||||
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
|
||||
})
|
||||
|
||||
QUnit.test('should be placed dynamically with the dynamic placement option', function (assert) {
|
||||
QUnit.test('should be placed dynamically to viewport with the dynamic placement option', function (assert) {
|
||||
assert.expect(6)
|
||||
var $style = $('<style> a[rel="tooltip"] { display: inline-block; position: absolute; } </style>')
|
||||
var $style = $('<style> div[rel="tooltip"] { position: absolute; } #qunit-fixture { top: inherit; left: inherit } </style>').appendTo('head')
|
||||
var $container = $('<div/>')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
overflow: 'hidden',
|
||||
width: 600,
|
||||
height: 400,
|
||||
top: 0,
|
||||
left: 0
|
||||
position: 'relative',
|
||||
height: '100%'
|
||||
})
|
||||
.appendTo(document.body)
|
||||
.appendTo('#qunit-fixture')
|
||||
|
||||
var $topTooltip = $('<div style="left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>')
|
||||
.appendTo($container)
|
||||
.bootstrapTooltip({ placement: 'auto' })
|
||||
.bootstrapTooltip({ placement: 'auto', viewport: '#qunit-fixture' })
|
||||
|
||||
$topTooltip.bootstrapTooltip('show')
|
||||
assert.ok($('.tooltip').is('.bottom'), 'top positioned tooltip is dynamically positioned to bottom')
|
||||
@ -388,7 +398,7 @@ $(function () {
|
||||
|
||||
var $rightTooltip = $('<div style="right: 0;" rel="tooltip" title="Right tooltip">Right Dynamic Tooltip</div>')
|
||||
.appendTo($container)
|
||||
.bootstrapTooltip({ placement: 'right auto' })
|
||||
.bootstrapTooltip({ placement: 'right auto', viewport: '#qunit-fixture' })
|
||||
|
||||
$rightTooltip.bootstrapTooltip('show')
|
||||
assert.ok($('.tooltip').is('.left'), 'right positioned tooltip is dynamically positioned left')
|
||||
@ -398,7 +408,7 @@ $(function () {
|
||||
|
||||
var $leftTooltip = $('<div style="left: 0;" rel="tooltip" title="Left tooltip">Left Dynamic Tooltip</div>')
|
||||
.appendTo($container)
|
||||
.bootstrapTooltip({ placement: 'auto left' })
|
||||
.bootstrapTooltip({ placement: 'auto left', viewport: '#qunit-fixture' })
|
||||
|
||||
$leftTooltip.bootstrapTooltip('show')
|
||||
assert.ok($('.tooltip').is('.right'), 'left positioned tooltip is dynamically positioned right')
|
||||
@ -436,6 +446,31 @@ $(function () {
|
||||
$styles.remove()
|
||||
})
|
||||
|
||||
QUnit.test('should position tip on top if viewport has enough space and is not parent', function (assert) {
|
||||
assert.expect(2)
|
||||
var styles = '<style>'
|
||||
+ '#section { height: 300px; border: 1px solid red; margin-top: 100px; }'
|
||||
+ 'div[rel="tooltip"] { width: 150px; border: 1px solid blue; }'
|
||||
+ '</style>'
|
||||
var $styles = $(styles).appendTo('head')
|
||||
|
||||
var $container = $('<div id="section"/>').appendTo('#qunit-fixture')
|
||||
var $target = $('<div rel="tooltip" title="tip"/>')
|
||||
.appendTo($container)
|
||||
.bootstrapTooltip({
|
||||
placement: 'auto top',
|
||||
viewport: '#qunit-fixture'
|
||||
})
|
||||
|
||||
$target.bootstrapTooltip('show')
|
||||
assert.ok($('.tooltip').is('.top'), 'top positioned tooltip is dynamically positioned to top')
|
||||
|
||||
$target.bootstrapTooltip('hide')
|
||||
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
|
||||
|
||||
$styles.remove()
|
||||
})
|
||||
|
||||
QUnit.test('should position tip on bottom if the tip\'s dimension exceeds the viewport area and placement is "auto top"', function (assert) {
|
||||
assert.expect(2)
|
||||
var styles = '<style>'
|
||||
@ -719,6 +754,65 @@ $(function () {
|
||||
$styles.remove()
|
||||
})
|
||||
|
||||
QUnit.test('should get viewport element from function', function (assert) {
|
||||
assert.expect(3)
|
||||
var styles = '<style>'
|
||||
+ '.tooltip, .tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
|
||||
+ '.container-viewport { position: absolute; top: 50px; left: 60px; width: 300px; height: 300px; }'
|
||||
+ 'a[rel="tooltip"] { position: fixed; }'
|
||||
+ '</style>'
|
||||
var $styles = $(styles).appendTo('head')
|
||||
|
||||
var $container = $('<div class="container-viewport"/>').appendTo(document.body)
|
||||
var $target = $('<a href="#" rel="tooltip" title="tip" style="top: 50px; left: 350px;"/>').appendTo($container)
|
||||
$target
|
||||
.bootstrapTooltip({
|
||||
placement: 'bottom',
|
||||
viewport: function ($element) {
|
||||
assert.strictEqual($element[0], $target[0], 'viewport function was passed target as argument')
|
||||
return ($element.closest('.container-viewport'))
|
||||
}
|
||||
})
|
||||
|
||||
$target.bootstrapTooltip('show')
|
||||
var $tooltip = $container.find('.tooltip')
|
||||
assert.strictEqual(Math.round($tooltip.offset().left), Math.round(60 + $container.width() - $tooltip[0].offsetWidth))
|
||||
|
||||
$target.bootstrapTooltip('hide')
|
||||
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
|
||||
|
||||
$container.remove()
|
||||
$styles.remove()
|
||||
})
|
||||
|
||||
QUnit.test('should not misplace the tip when the right edge offset is greater or equal than the viewport width', function (assert) {
|
||||
assert.expect(2)
|
||||
var styles = '<style>'
|
||||
+ '.tooltip, .tooltip *, .tooltip *:before, .tooltip *:after { box-sizing: border-box; }'
|
||||
+ '.container-viewport, .container-viewport *, .container-viewport *:before, .container-viewport *:after { box-sizing: border-box; }'
|
||||
+ '.tooltip, .tooltip .tooltip-inner { width: 50px; height: 50px; max-width: none; background: red; }'
|
||||
+ '.container-viewport { padding: 100px; margin-left: 100px; width: 100px; }'
|
||||
+ '</style>'
|
||||
var $styles = $(styles).appendTo('head')
|
||||
|
||||
var $container = $('<div class="container-viewport"/>').appendTo(document.body)
|
||||
var $target = $('<a href="#" rel="tooltip" title="tip">foobar</a>')
|
||||
.appendTo($container)
|
||||
.bootstrapTooltip({
|
||||
viewport: '.container-viewport'
|
||||
})
|
||||
|
||||
$target.bootstrapTooltip('show')
|
||||
var $tooltip = $container.find('.tooltip')
|
||||
assert.strictEqual(Math.round($tooltip.offset().left), Math.round($target.position().left + $target.width() / 2 - $tooltip[0].offsetWidth / 2))
|
||||
|
||||
$target.bootstrapTooltip('hide')
|
||||
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
|
||||
|
||||
$container.remove()
|
||||
$styles.remove()
|
||||
})
|
||||
|
||||
QUnit.test('should not error when trying to show an auto-placed tooltip that has been removed from the dom', function (assert) {
|
||||
assert.expect(1)
|
||||
var passed = true
|
||||
@ -1180,4 +1274,14 @@ $(function () {
|
||||
assert.strictEqual($tooltip.data('bs.tooltip'), undefined, 'should not initialize the tooltip')
|
||||
})
|
||||
|
||||
QUnit.test('should throw an error when template contains multiple top-level elements', function (assert) {
|
||||
assert.expect(1)
|
||||
assert.throws(function () {
|
||||
$('<a href="#" data-toggle="tooltip" title="Another tooltip"></a>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({ template: '<div>Foo</div><div>Bar</div>' })
|
||||
.bootstrapTooltip('show')
|
||||
}, new Error('tooltip `template` option must consist of exactly 1 top-level element!'))
|
||||
})
|
||||
|
||||
})
|
||||
|
@ -50,7 +50,7 @@
|
||||
this.type = type
|
||||
this.$element = $(element)
|
||||
this.options = this.getOptions(options)
|
||||
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
||||
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
||||
|
||||
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
||||
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
||||
@ -185,6 +185,7 @@
|
||||
.data('bs.' + this.type, this)
|
||||
|
||||
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
||||
this.$element.trigger('inserted.bs.' + this.type)
|
||||
|
||||
var pos = this.getPosition()
|
||||
var actualWidth = $tip[0].offsetWidth
|
||||
@ -192,13 +193,12 @@
|
||||
|
||||
if (autoPlace) {
|
||||
var orgPlacement = placement
|
||||
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
|
||||
var containerDim = this.getPosition($container)
|
||||
var viewportDim = this.getPosition(this.$viewport)
|
||||
|
||||
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
|
||||
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
|
||||
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
||||
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
||||
placement
|
||||
|
||||
$tip
|
||||
@ -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', '')
|
||||
}
|
||||
}
|
||||
@ -377,7 +377,7 @@
|
||||
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
||||
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
||||
delta.left = viewportDimensions.left - leftEdgeOffset
|
||||
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
|
||||
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
||||
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
||||
}
|
||||
}
|
||||
@ -403,7 +403,13 @@
|
||||
}
|
||||
|
||||
Tooltip.prototype.tip = function () {
|
||||
return (this.$tip = this.$tip || $(this.options.template))
|
||||
if (!this.$tip) {
|
||||
this.$tip = $(this.options.template)
|
||||
if (this.$tip.length != 1) {
|
||||
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
||||
}
|
||||
}
|
||||
return this.$tip
|
||||
}
|
||||
|
||||
Tooltip.prototype.arrow = function () {
|
||||
@ -440,6 +446,12 @@
|
||||
clearTimeout(this.timeout)
|
||||
this.hide(function () {
|
||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||
if (that.$tip) {
|
||||
that.$tip.detach()
|
||||
}
|
||||
that.$tip = null
|
||||
that.$arrow = null
|
||||
that.$viewport = null
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
font-weight: @badge-font-weight;
|
||||
color: @badge-color;
|
||||
line-height: @badge-line-height;
|
||||
vertical-align: baseline;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
background-color: @badge-bg;
|
||||
|
@ -36,6 +36,7 @@
|
||||
margin-left: -5px; // Offset the first child's margin
|
||||
&:extend(.clearfix all);
|
||||
|
||||
.btn,
|
||||
.btn-group,
|
||||
.input-group {
|
||||
float: left;
|
||||
|
@ -29,7 +29,7 @@
|
||||
@media all and (transform-3d), (-webkit-transform-3d) {
|
||||
.transition-transform(~'0.6s ease-in-out');
|
||||
.backface-visibility(~'hidden');
|
||||
.perspective(1000);
|
||||
.perspective(1000px);
|
||||
|
||||
&.next,
|
||||
&.active.right {
|
||||
|
@ -11,6 +11,7 @@
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
border-top: @caret-width-base dashed;
|
||||
border-top: @caret-width-base ~"solid\9"; // IE8
|
||||
border-right: @caret-width-base solid transparent;
|
||||
border-left: @caret-width-base solid transparent;
|
||||
}
|
||||
|
@ -56,7 +56,6 @@ input[type="checkbox"] {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
// Set the height of file controls to match text inputs
|
||||
input[type="file"] {
|
||||
display: block;
|
||||
}
|
||||
@ -338,10 +337,10 @@ input[type="checkbox"] {
|
||||
}
|
||||
.form-control-static {
|
||||
height: @input-height-small;
|
||||
padding: @padding-small-vertical @padding-small-horizontal;
|
||||
min-height: (@line-height-computed + @font-size-small);
|
||||
padding: (@padding-small-vertical + 1) @padding-small-horizontal;
|
||||
font-size: @font-size-small;
|
||||
line-height: @line-height-small;
|
||||
min-height: (@line-height-computed + @font-size-small);
|
||||
}
|
||||
}
|
||||
|
||||
@ -366,10 +365,10 @@ input[type="checkbox"] {
|
||||
}
|
||||
.form-control-static {
|
||||
height: @input-height-large;
|
||||
padding: @padding-large-vertical @padding-large-horizontal;
|
||||
min-height: (@line-height-computed + @font-size-large);
|
||||
padding: (@padding-large-vertical + 1) @padding-large-horizontal;
|
||||
font-size: @font-size-large;
|
||||
line-height: @line-height-large;
|
||||
min-height: (@line-height-computed + @font-size-large);
|
||||
}
|
||||
}
|
||||
|
||||
@ -401,13 +400,15 @@ input[type="checkbox"] {
|
||||
pointer-events: none;
|
||||
}
|
||||
.input-lg + .form-control-feedback,
|
||||
.input-group-lg + .form-control-feedback {
|
||||
.input-group-lg + .form-control-feedback,
|
||||
.form-group-lg .form-control + .form-control-feedback {
|
||||
width: @input-height-large;
|
||||
height: @input-height-large;
|
||||
line-height: @input-height-large;
|
||||
}
|
||||
.input-sm + .form-control-feedback,
|
||||
.input-group-sm + .form-control-feedback {
|
||||
.input-group-sm + .form-control-feedback,
|
||||
.form-group-sm .form-control + .form-control-feedback {
|
||||
width: @input-height-small;
|
||||
height: @input-height-small;
|
||||
line-height: @input-height-small;
|
||||
@ -576,7 +577,7 @@ input[type="checkbox"] {
|
||||
// Reposition the icon because it's now within a grid column and columns have
|
||||
// `position: relative;` on them. Also accounts for the grid gutter padding.
|
||||
.has-feedback .form-control-feedback {
|
||||
right: (@grid-gutter-width / 2);
|
||||
right: floor((@grid-gutter-width / 2));
|
||||
}
|
||||
|
||||
// Form group sizes
|
||||
@ -587,6 +588,7 @@ input[type="checkbox"] {
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.control-label {
|
||||
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
|
||||
font-size: @font-size-large;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -594,6 +596,7 @@ input[type="checkbox"] {
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.control-label {
|
||||
padding-top: (@padding-small-vertical + 1);
|
||||
font-size: @font-size-small;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,6 +160,7 @@
|
||||
&:last-child {
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
z-index: 2;
|
||||
margin-left: -1px;
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,11 @@
|
||||
|
||||
.media-object {
|
||||
display: block;
|
||||
|
||||
// Fix collapse in webkit from max-width: 100% and display: table-cell.
|
||||
&.img-thumbnail {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
.media-right,
|
||||
|
@ -11,6 +11,7 @@
|
||||
@import "mixins/responsive-visibility.less";
|
||||
@import "mixins/size.less";
|
||||
@import "mixins/tab-focus.less";
|
||||
@import "mixins/reset-text.less";
|
||||
@import "mixins/text-emphasis.less";
|
||||
@import "mixins/text-overflow.less";
|
||||
@import "mixins/vendor-prefixes.less";
|
||||
|
@ -19,8 +19,8 @@
|
||||
// Prevent columns from collapsing when empty
|
||||
min-height: 1px;
|
||||
// Inner gutter via padding
|
||||
padding-left: (@grid-gutter-width / 2);
|
||||
padding-right: (@grid-gutter-width / 2);
|
||||
padding-left: ceil((@grid-gutter-width / 2));
|
||||
padding-right: floor((@grid-gutter-width / 2));
|
||||
}
|
||||
}
|
||||
.col(1); // kickstart it
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
// Creates a wrapper for a series of columns
|
||||
.make-row(@gutter: @grid-gutter-width) {
|
||||
margin-left: (@gutter / -2);
|
||||
margin-right: (@gutter / -2);
|
||||
margin-left: ceil((@gutter / -2));
|
||||
margin-right: floor((@gutter / -2));
|
||||
&:extend(.clearfix all);
|
||||
}
|
||||
|
||||
|
18
less/mixins/reset-text.less
Normal file
18
less/mixins/reset-text.less
Normal file
@ -0,0 +1,18 @@
|
||||
.reset-text() {
|
||||
font-family: @font-family-base;
|
||||
// We deliberately do NOT reset font-size.
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
letter-spacing: normal;
|
||||
line-break: auto;
|
||||
line-height: @line-height-base;
|
||||
text-align: left; // Fallback for where `start` is not supported
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
white-space: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
}
|
19
less/normalize.less
vendored
19
less/normalize.less
vendored
@ -1,9 +1,9 @@
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
//
|
||||
// 1. Set default font family to sans-serif.
|
||||
// 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
// user zoom.
|
||||
// 2. Prevent iOS and IE text size adjust after device orientation change,
|
||||
// without disabling user zoom.
|
||||
//
|
||||
|
||||
html {
|
||||
@ -71,7 +71,7 @@ audio:not([controls]) {
|
||||
|
||||
//
|
||||
// Address `[hidden]` styling not present in IE 8/9/10.
|
||||
// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
||||
// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
|
||||
//
|
||||
|
||||
[hidden],
|
||||
@ -91,7 +91,8 @@ a {
|
||||
}
|
||||
|
||||
//
|
||||
// Improve readability when focused and also mouse hovered in all browsers.
|
||||
// Improve readability of focused elements when they are also in an
|
||||
// active/hover state.
|
||||
//
|
||||
|
||||
a:active,
|
||||
@ -209,7 +210,6 @@ figure {
|
||||
//
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
@ -350,15 +350,12 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
|
||||
//
|
||||
// 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
||||
// (include `-moz` to future-proof).
|
||||
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
|
||||
//
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; // 1
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; // 2
|
||||
box-sizing: content-box;
|
||||
box-sizing: content-box; //2
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -40,6 +40,7 @@
|
||||
> li > span {
|
||||
&:hover,
|
||||
&:focus {
|
||||
z-index: 3;
|
||||
color: @pagination-hover-color;
|
||||
background-color: @pagination-hover-bg;
|
||||
border-color: @pagination-hover-border;
|
||||
|
@ -76,6 +76,7 @@
|
||||
.border-top-radius((@panel-border-radius - 1));
|
||||
}
|
||||
}
|
||||
|
||||
// Add border bottom radius for last one
|
||||
&:last-child {
|
||||
.list-group-item:last-child {
|
||||
@ -84,6 +85,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
> .panel-heading + .panel-collapse > .list-group {
|
||||
.list-group-item:first-child {
|
||||
.border-top-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Collapse space between when there's no additional content.
|
||||
.panel-heading + .list-group {
|
||||
|
@ -11,12 +11,11 @@
|
||||
display: none;
|
||||
max-width: @popover-max-width;
|
||||
padding: 1px;
|
||||
// Reset font and text properties given new insertion method
|
||||
font-family: @font-family-base;
|
||||
// Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
.reset-text();
|
||||
font-size: @font-size-base;
|
||||
font-weight: normal;
|
||||
line-height: @line-height-base;
|
||||
text-align: left;
|
||||
|
||||
background-color: @popover-bg;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid @popover-fallback-border-color;
|
||||
@ -24,9 +23,6 @@
|
||||
border-radius: @border-radius-large;
|
||||
.box-shadow(0 5px 10px rgba(0,0,0,.2));
|
||||
|
||||
// Overrides for proper insertion
|
||||
white-space: normal;
|
||||
|
||||
// Offset the popover to account for the popover arrow
|
||||
&.top { margin-top: -@popover-arrow-width; }
|
||||
&.right { margin-left: @popover-arrow-width; }
|
||||
|
@ -67,12 +67,6 @@
|
||||
}
|
||||
|
||||
// Bootstrap specific changes start
|
||||
//
|
||||
// Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
|
||||
// Once fixed, we can just straight up remove this.
|
||||
select {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
// Bootstrap components
|
||||
.navbar {
|
||||
|
@ -155,7 +155,6 @@ hr {
|
||||
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
|
||||
// for traditionally non-focusable elements with role="button"
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||
// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
|
@ -28,6 +28,12 @@
|
||||
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
||||
.badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
@ -53,11 +59,18 @@
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled,
|
||||
&[disabled] {
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&.focus,
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken(@btn-color, 12%);
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Common styles
|
||||
|
@ -8,11 +8,11 @@
|
||||
position: absolute;
|
||||
z-index: @zindex-tooltip;
|
||||
display: block;
|
||||
// Reset font and text properties given new insertion method
|
||||
font-family: @font-family-base;
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
.reset-text();
|
||||
font-size: @font-size-small;
|
||||
font-weight: normal;
|
||||
line-height: 1.4;
|
||||
|
||||
.opacity(0);
|
||||
|
||||
&.in { .opacity(@tooltip-opacity); }
|
||||
@ -28,7 +28,6 @@
|
||||
padding: 3px 8px;
|
||||
color: @tooltip-color;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background-color: @tooltip-bg;
|
||||
border-radius: @border-radius-base;
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
// package metadata file for Meteor.js
|
||||
|
||||
/* jshint strict:false */
|
||||
/* global Package:true */
|
||||
|
||||
Package.describe({
|
||||
name: 'twbs:bootstrap', // http://atmospherejs.com/twbs/bootstrap
|
||||
summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
|
||||
@ -17,6 +20,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');
|
||||
});
|
||||
|
33
package.json
33
package.json
@ -32,34 +32,35 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"btoa": "~1.1.2",
|
||||
"glob": "~5.0.3",
|
||||
"glob": "~5.0.5",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-autoprefixer": "~2.2.0",
|
||||
"grunt-autoprefixer": "~3.0.0",
|
||||
"grunt-banner": "~0.3.1",
|
||||
"grunt-contrib-clean": "~0.6.0",
|
||||
"grunt-contrib-compress": "~0.13.0",
|
||||
"grunt-contrib-concat": "~0.5.1",
|
||||
"grunt-contrib-connect": "~0.9.0",
|
||||
"grunt-contrib-connect": "~0.10.1",
|
||||
"grunt-contrib-copy": "~0.8.0",
|
||||
"grunt-contrib-csslint": "~0.4.0",
|
||||
"grunt-contrib-cssmin": "~0.12.2",
|
||||
"grunt-contrib-htmlmin": "~0.4.0",
|
||||
"grunt-contrib-jade": "~0.14.1",
|
||||
"grunt-contrib-jshint": "~0.11.0",
|
||||
"grunt-contrib-less": "~1.0.0",
|
||||
"grunt-contrib-qunit": "~0.5.2",
|
||||
"grunt-contrib-uglify": "~0.8.0",
|
||||
"grunt-contrib-jshint": "~0.11.2",
|
||||
"grunt-contrib-less": "~1.0.1",
|
||||
"grunt-contrib-qunit": "~0.7.0",
|
||||
"grunt-contrib-uglify": "~0.9.1",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-csscomb": "~3.0.0",
|
||||
"grunt-exec": "~0.4.6",
|
||||
"grunt-html": "~4.0.1",
|
||||
"grunt-html": "~4.0.2",
|
||||
"grunt-jekyll": "~0.4.2",
|
||||
"grunt-jscs": "~1.5.0",
|
||||
"grunt-saucelabs": "~8.6.0",
|
||||
"grunt-sed": "~0.1.1",
|
||||
"grunt-jscs": "~1.6.0",
|
||||
"grunt-saucelabs": "~8.6.1",
|
||||
"grunt-sed": "twbs/grunt-sed#v0.2.0",
|
||||
"load-grunt-tasks": "~3.1.0",
|
||||
"markdown-it": "^4.0.1",
|
||||
"markdown-it": "^4.1.1",
|
||||
"npm-shrinkwrap": "^200.1.0",
|
||||
"time-grunt": "^1.1.0"
|
||||
"time-grunt": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.1"
|
||||
@ -82,6 +83,10 @@
|
||||
"exports": "$"
|
||||
}
|
||||
},
|
||||
"files": ["css", "fonts", "js"]
|
||||
"files": [
|
||||
"css",
|
||||
"fonts",
|
||||
"js"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
1691
test-infra/npm-shrinkwrap.json
generated
1691
test-infra/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user