2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Merge branch 'master' of https://github.com/twbs/bootstrap into list_group_buttons

This commit is contained in:
Zac Echola
2015-04-28 09:45:16 -05:00
81 changed files with 4668 additions and 2827 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ Guidelines for bug reports:
latest `master` or development branch in the repository. latest `master` or development branch in the repository.
3. **Isolate the problem** — ideally create a [reduced test 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. [This JS Bin](http://jsbin.com/lefey/1/edit?html,output) is a helpful template.
+34 -2
View File
@@ -63,7 +63,7 @@ module.exports = function (grunt) {
options: { options: {
jshintrc: 'grunt/.jshintrc' jshintrc: 'grunt/.jshintrc'
}, },
src: ['Gruntfile.js', 'grunt/*.js'] src: ['Gruntfile.js', 'package.js', 'grunt/*.js']
}, },
core: { core: {
src: 'js/*.js' src: 'js/*.js'
@@ -126,6 +126,10 @@ module.exports = function (grunt) {
uglify: { uglify: {
options: { options: {
compress: {
warnings: false
},
mangle: true,
preserveComments: 'some' preserveComments: 'some'
}, },
core: { 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: { jade: {
options: { options: {
pretty: true, pretty: true,
@@ -365,6 +389,14 @@ module.exports = function (grunt) {
return old ? RegExp.quote(old) : old; return old ? RegExp.quote(old) : old;
})(), })(),
replacement: grunt.option('newver'), replacement: grunt.option('newver'),
exclude: [
'dist/fonts',
'docs/assets',
'fonts',
'js/tests/vendor',
'node_modules',
'test-infra'
],
recursive: true recursive: true
} }
}, },
@@ -491,7 +523,7 @@ module.exports = function (grunt) {
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']); 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('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). // 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. // This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
+3 -1
View File
@@ -1,4 +1,5 @@
# [Bootstrap](http://getbootstrap.com) # [Bootstrap](http://getbootstrap.com)
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
![Bower version](https://img.shields.io/bower/v/bootstrap.svg?style=flat) ![Bower version](https://img.shields.io/bower/v/bootstrap.svg?style=flat)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg?style=flat)](https://www.npmjs.com/package/bootstrap) [![npm version](https://img.shields.io/npm/v/bootstrap.svg?style=flat)](https://www.npmjs.com/package/bootstrap)
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg?style=flat)](https://travis-ci.org/twbs/bootstrap) [![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg?style=flat)](https://travis-ci.org/twbs/bootstrap)
@@ -100,10 +101,11 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
## Community ## 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). - Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com). - 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. - 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)). - 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. - 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.
+3 -8
View File
@@ -1,7 +1,6 @@
{ {
"name": "bootstrap", "name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "3.3.4",
"keywords": [ "keywords": [
"css", "css",
"js", "js",
@@ -13,15 +12,11 @@
"web" "web"
], ],
"homepage": "http://getbootstrap.com", "homepage": "http://getbootstrap.com",
"license": "MIT",
"moduleType": "globals",
"main": [ "main": [
"less/bootstrap.less", "less/bootstrap.less",
"dist/css/bootstrap.css", "dist/js/bootstrap.js"
"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"
], ],
"ignore": [ "ignore": [
"/.*", "/.*",
+123 -12
View File
@@ -29,6 +29,27 @@
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
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-default .badge,
.btn-primary .badge, .btn-primary .badge,
.btn-success .badge, .btn-success .badge,
@@ -64,8 +85,23 @@
border-color: #dbdbdb; border-color: #dbdbdb;
} }
.btn-default.disabled, .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-color: #e0e0e0;
background-image: none; background-image: none;
} }
@@ -90,8 +126,23 @@
border-color: #245580; border-color: #245580;
} }
.btn-primary.disabled, .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-color: #265a88;
background-image: none; background-image: none;
} }
@@ -116,8 +167,23 @@
border-color: #3e8f3e; border-color: #3e8f3e;
} }
.btn-success.disabled, .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-color: #419641;
background-image: none; background-image: none;
} }
@@ -142,8 +208,23 @@
border-color: #28a4c9; border-color: #28a4c9;
} }
.btn-info.disabled, .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-color: #2aabd2;
background-image: none; background-image: none;
} }
@@ -168,8 +249,23 @@
border-color: #e38d13; border-color: #e38d13;
} }
.btn-warning.disabled, .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-color: #eb9316;
background-image: none; background-image: none;
} }
@@ -194,8 +290,23 @@
border-color: #b92c28; border-color: #b92c28;
} }
.btn-danger.disabled, .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-color: #c12e2a;
background-image: none; background-image: none;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+48 -13
View File
@@ -4,7 +4,7 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * 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 { html {
font-family: sans-serif; font-family: sans-serif;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
@@ -239,9 +239,6 @@ th {
h3 { h3 {
page-break-after: avoid; page-break-after: avoid;
} }
select {
background: #fff !important;
}
.navbar { .navbar {
display: none; display: none;
} }
@@ -2739,7 +2736,7 @@ select[multiple].input-sm {
.form-group-sm .form-control-static { .form-group-sm .form-control-static {
height: 30px; height: 30px;
min-height: 32px; min-height: 32px;
padding: 5px 10px; padding: 6px 10px;
font-size: 12px; font-size: 12px;
line-height: 1.5; line-height: 1.5;
} }
@@ -2776,7 +2773,7 @@ select[multiple].input-lg {
.form-group-lg .form-control-static { .form-group-lg .form-control-static {
height: 46px; height: 46px;
min-height: 38px; min-height: 38px;
padding: 10px 16px; padding: 11px 16px;
font-size: 18px; font-size: 18px;
line-height: 1.3333333; line-height: 1.3333333;
} }
@@ -2799,13 +2796,15 @@ select[multiple].input-lg {
pointer-events: none; pointer-events: none;
} }
.input-lg + .form-control-feedback, .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; width: 46px;
height: 46px; height: 46px;
line-height: 46px; line-height: 46px;
} }
.input-sm + .form-control-feedback, .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; width: 30px;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
@@ -2991,11 +2990,13 @@ select[multiple].input-lg {
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label { .form-horizontal .form-group-lg .control-label {
padding-top: 14.333333px; padding-top: 14.333333px;
font-size: 18px;
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label { .form-horizontal .form-group-sm .control-label {
padding-top: 6px; padding-top: 6px;
font-size: 12px;
} }
} }
.btn { .btn {
@@ -3559,6 +3560,7 @@ tbody.collapse.in {
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: 4px dashed; border-top: 4px dashed;
border-top: 4px solid\9;
border-right: 4px solid transparent; border-right: 4px solid transparent;
border-left: 4px solid transparent; border-left: 4px solid transparent;
} }
@@ -3723,6 +3725,7 @@ tbody.collapse.in {
.btn-toolbar { .btn-toolbar {
margin-left: -5px; margin-left: -5px;
} }
.btn-toolbar .btn,
.btn-toolbar .btn-group, .btn-toolbar .btn-group,
.btn-toolbar .input-group { .btn-toolbar .input-group {
float: left; 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,
.input-group-btn:last-child > .btn-group { .input-group-btn:last-child > .btn-group {
z-index: 2;
margin-left: -1px; margin-left: -1px;
} }
.nav { .nav {
@@ -4788,6 +4792,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination > li > span:hover, .pagination > li > span:hover,
.pagination > li > a:focus, .pagination > li > a:focus,
.pagination > li > span:focus { .pagination > li > span:focus {
z-index: 3;
color: #23527c; color: #23527c;
background-color: #eee; background-color: #eee;
border-color: #ddd; border-color: #ddd;
@@ -4960,7 +4965,7 @@ a.label:focus {
color: #fff; color: #fff;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: middle;
background-color: #777; background-color: #777;
border-radius: 10px; border-radius: 10px;
} }
@@ -5247,6 +5252,9 @@ a.thumbnail.active {
.media-object { .media-object {
display: block; display: block;
} }
.media-object.img-thumbnail {
max-width: none;
}
.media-right, .media-right,
.media > .pull-right { .media > .pull-right {
padding-left: 10px; padding-left: 10px;
@@ -5506,6 +5514,10 @@ a.list-group-item-danger.active:focus {
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
border-bottom-left-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 { .panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0; border-top-width: 0;
} }
@@ -5987,10 +5999,23 @@ button.close {
display: block; display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
font-style: normal;
font-weight: 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); filter: alpha(opacity=0);
opacity: 0; opacity: 0;
line-break: auto;
} }
.tooltip.in { .tooltip.in {
filter: alpha(opacity=90); filter: alpha(opacity=90);
@@ -6017,7 +6042,6 @@ button.close {
padding: 3px 8px; padding: 3px 8px;
color: #fff; color: #fff;
text-align: center; text-align: center;
text-decoration: none;
background-color: #000; background-color: #000;
border-radius: 4px; border-radius: 4px;
} }
@@ -6094,9 +6118,18 @@ button.close {
padding: 1px; padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 14px;
font-style: normal;
font-weight: normal; font-weight: normal;
line-height: 1.42857143; line-height: 1.42857143;
text-align: left; 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; white-space: normal;
background-color: #fff; background-color: #fff;
-webkit-background-clip: padding-box; -webkit-background-clip: padding-box;
@@ -6106,6 +6139,8 @@ button.close {
border-radius: 6px; border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
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 { .popover.top {
margin-top: -10px; margin-top: -10px;
@@ -6233,8 +6268,8 @@ button.close {
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
backface-visibility: hidden; backface-visibility: hidden;
-webkit-perspective: 1000; -webkit-perspective: 1000px;
perspective: 1000; perspective: 1000px;
} }
.carousel-inner > .item.next, .carousel-inner > .item.next,
.carousel-inner > .item.active.right { .carousel-inner > .item.active.right {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+68 -57
View File
@@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') {
var val = $el.is('input') ? 'val' : 'html' var val = $el.is('input') ? 'val' : 'html'
var data = $el.data() var data = $el.data()
state = state + 'Text' state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]()) if (data.resetText == null) $el.data('resetText', $el[val]())
@@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') {
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false if ($input.prop('checked')) changed = false
else $parent.find('.active').removeClass('active') if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} else { } else {
@@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') {
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle') 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) { .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)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@@ -761,6 +761,40 @@ if (typeof jQuery === 'undefined') {
Dropdown.VERSION = '3.3.4' 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) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
@@ -810,7 +844,7 @@ if (typeof jQuery === 'undefined') {
var $parent = getParent($this) var $parent = getParent($this)
var isActive = $parent.hasClass('open') 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') if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click') return $this.trigger('click')
} }
@@ -822,47 +856,13 @@ if (typeof jQuery === 'undefined') {
var index = $items.index(e.target) var index = $items.index(e.target)
if (e.which == 38 && index > 0) index-- // up if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0 if (!~index) index = 0
$items.eq(index).trigger('focus') $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 // 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', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .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', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery); }(jQuery);
@@ -1295,7 +1294,7 @@ if (typeof jQuery === 'undefined') {
this.type = type this.type = type
this.$element = $(element) this.$element = $(element)
this.options = this.getOptions(options) 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) { 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!') 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) .data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition() var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
@@ -1437,13 +1437,12 @@ if (typeof jQuery === 'undefined') {
if (autoPlace) { if (autoPlace) {
var orgPlacement = placement var orgPlacement = placement
var $container = this.options.container ? $(this.options.container) : this.$element.parent() var viewportDim = this.getPosition(this.$viewport)
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' : placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' : placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement placement
$tip $tip
@@ -1484,8 +1483,8 @@ if (typeof jQuery === 'undefined') {
if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0 if (isNaN(marginLeft)) marginLeft = 0
offset.top = offset.top + marginTop offset.top += marginTop
offset.left = offset.left + marginLeft offset.left += marginLeft
// $.fn.offset doesn't round pixel values // $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0 // so we use setOffset directly with our own function B-0
@@ -1567,7 +1566,7 @@ if (typeof jQuery === 'undefined') {
Tooltip.prototype.fixTitle = function () { Tooltip.prototype.fixTitle = function () {
var $e = this.$element 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', '') $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
} }
} }
@@ -1622,7 +1621,7 @@ if (typeof jQuery === 'undefined') {
var rightEdgeOffset = pos.left + viewportPadding + actualWidth var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset 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 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
} }
} }
@@ -1648,7 +1647,13 @@ if (typeof jQuery === 'undefined') {
} }
Tooltip.prototype.tip = function () { 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 () { Tooltip.prototype.arrow = function () {
@@ -1685,6 +1690,12 @@ if (typeof jQuery === 'undefined') {
clearTimeout(this.timeout) clearTimeout(this.timeout)
this.hide(function () { this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type) 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 $active = container.find('> .active')
var transition = callback var transition = callback
&& $.support.transition && $.support.transition
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() { function next() {
$active $active
+3 -2
View File
File diff suppressed because one or more lines are too long
+20
View File
@@ -88,6 +88,16 @@
origin: > origin: >
Bootstrap#15832 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: > browser: >
Chrome Chrome
@@ -200,6 +210,16 @@
origin: > origin: >
Bootstrap#15832 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: > browser: >
Safari (iOS) Safari (iOS)
+19 -13
View File
@@ -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> <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> <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="bs-example" data-example-id="static-dropdown">
<div class="dropdown clearfix"> <div class="dropdown clearfix">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true"> <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> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
</ul> </ul>
</div> </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 --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<div class="dropdown"> <div class="dropdown">
@@ -42,9 +31,26 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul> </ul>
</div> </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"> <div class="dropup">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-expanded="true"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-expanded="true">
Dropdown Dropup
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2"> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
-1
View File
@@ -164,7 +164,6 @@
} }
.hidden { .hidden {
display: none !important; display: none !important;
visibility: hidden !important;
} }
.invisible { .invisible {
visibility: hidden; visibility: hidden;
+1
View File
@@ -8,6 +8,7 @@
<h2 id="affix-usage">Usage</h2> <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>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> <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> <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>
+1 -1
View File
@@ -110,7 +110,7 @@
</div> </div>
</div> </div>
<div class="item"> <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"> <div class="carousel-caption">
<h3>Third slide label</h3> <h3>Third slide label</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p> <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
+6 -1
View File
@@ -233,10 +233,11 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
</tr> </tr>
<tr> <tr>
<td>viewport</td> <td>viewport</td>
<td>string | object</td> <td>string | object | function</td>
<td>{ selector: 'body', padding: 0 }</td> <td>{ selector: 'body', padding: 0 }</td>
<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>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> </td>
</tr> </tr>
</tbody> </tbody>
@@ -293,6 +294,10 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
<td>hidden.bs.popover</td> <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> <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>
<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> </tbody>
</table> </table>
</div><!-- /.table-responsive --> </div><!-- /.table-responsive -->
+6 -1
View File
@@ -199,10 +199,11 @@ $('#example').tooltip(options)
</tr> </tr>
<tr> <tr>
<td>viewport</td> <td>viewport</td>
<td>string | object</td> <td>string | object | function</td>
<td>{ selector: 'body', padding: 0 }</td> <td>{ selector: 'body', padding: 0 }</td>
<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>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> </td>
</tr> </tr>
</tbody> </tbody>
@@ -260,6 +261,10 @@ $('#example').tooltip(options)
<td>hidden.bs.tooltip</td> <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> <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>
<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> </tbody>
</table> </table>
</div><!-- /.table-responsive --> </div><!-- /.table-responsive -->
+2 -2
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,6 +1,6 @@
/*! /*!
* Bootstrap Docs (http://getbootstrap.com) * 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 * Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/. * details, see http://creativecommons.org/licenses/by/3.0/.
*/ */
@@ -236,7 +236,7 @@ h4 code {
.bs-docs-masthead, .bs-docs-masthead,
.bs-docs-header { .bs-docs-header {
position: relative; position: relative;
padding: 30px 15px; padding: 30px 0;
color: #cdbfe3; color: #cdbfe3;
text-align: center; text-align: center;
text-shadow: 0 1px 0 rgba(0,0,0,.1); text-shadow: 0 1px 0 rgba(0,0,0,.1);
Binary file not shown.
+46 -45
View File
File diff suppressed because one or more lines are too long
+14 -14
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+25 -26
View File
@@ -4,7 +4,7 @@
/*! /*!
* JavaScript for Bootstrap's docs (http://getbootstrap.com) * 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 * Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/. * details, see http://creativecommons.org/licenses/by/3.0/.
*/ */
@@ -127,7 +127,7 @@
// Config ZeroClipboard // Config ZeroClipboard
ZeroClipboard.config({ ZeroClipboard.config({
moviePath: '/assets/flash/ZeroClipboard.swf', swfPath: '/assets/flash/ZeroClipboard.swf',
hoverClass: 'btn-clipboard-hover' hoverClass: 'btn-clipboard-hover'
}) })
@@ -136,39 +136,38 @@
var btnHtml = '<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>' var btnHtml = '<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>'
$(this).before(btnHtml) $(this).before(btnHtml)
}) })
var zeroClipboard = new ZeroClipboard($('.btn-clipboard')) var zeroClipboard = new ZeroClipboard($('.btn-clipboard'))
var htmlBridge = $('#global-zeroclipboard-html-bridge') var htmlBridge = $('#global-zeroclipboard-html-bridge')
// Handlers for ZeroClipboard // Handlers for ZeroClipboard
zeroClipboard.on('load', function () { zeroClipboard.on('ready', function () {
htmlBridge htmlBridge
.data('placement', 'top') .data('placement', 'top')
.attr('title', 'Copy to clipboard') .attr('title', 'Copy to clipboard')
.tooltip() .tooltip()
// Copy to clipboard
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('aftercopy', function () {
htmlBridge
.attr('title', 'Copied!')
.tooltip('fixTitle')
.tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('fixTitle')
})
}) })
// Copy to clipboard // Hide copy button on error
zeroClipboard.on('dataRequested', function (client) { zeroClipboard.on('error', function () {
var highlight = $(this).parent().nextAll('.highlight').first() $('.zero-clipboard').remove()
client.setText(highlight.text()) ZeroClipboard.destroy()
})
// Notify copy success and reset tooltip title
zeroClipboard.on('complete', function () {
htmlBridge
.attr('title', 'Copied!')
.tooltip('fixTitle')
.tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('fixTitle')
})
// Notify copy failure
zeroClipboard.on('noflash wrongflash', function () {
htmlBridge
.attr('title', 'Flash required')
.tooltip('fixTitle')
.tooltip('show')
}) })
}) })
@@ -177,5 +176,5 @@
;(function () { ;(function () {
'use strict'; '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');
})(); })();
+10 -9
View File
@@ -1,6 +1,6 @@
/*! /*!
* Bootstrap Customizer (http://getbootstrap.com/customize/) * 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 * Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/. * 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' + ' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n\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') var importDropTarget = $('#import-drop-target')
function showError(msg, err) { 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() 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 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 // Core stylesheets like 'normalize.less' are not included in the form
// since disabling them would wreck everything, and so their 'fileInclude' // since disabling them would wreck everything, and so their 'fileInclude'
// will be 'undefined'. // 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 // Custom variables are added after Bootstrap variables so the custom
// ones take precedence. // 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 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 { try {
intoResult[baseFilename + '.css'] = cw + tree.toCSS() intoResult[baseFilename + '.css'] = cw + tree.toCSS()
intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true }) intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true })
} } catch (compileErr) {
catch (compileErr) {
return promise.reject(compileErr) return promise.reject(compileErr)
} }
promise.resolve() promise.resolve()
@@ -366,7 +365,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
e.stopPropagation() e.stopPropagation()
e.preventDefault() 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() 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) { ).done(function (css, js, fonts) {
generateZip(css, js, fonts, configJson, function (blob) { generateZip(css, js, fonts, configJson, function (blob) {
$compileBtn.removeAttr('disabled') $compileBtn.removeAttr('disabled')
setTimeout(function () { saveAs(blob, 'bootstrap.zip') }, 0) setTimeout(function () {
saveAs(blob, 'bootstrap.zip')
}, 0)
}) })
}) })
}) })
+16 -2
View File
@@ -189,9 +189,23 @@
var builder = new BlobBuilder(); var builder = new BlobBuilder();
if (blobParts) { if (blobParts) {
for (var i = 0, len = blobParts.length; i < len; i++) { for (var i = 0, len = blobParts.length; i < len; i++) {
builder.append(blobParts[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)); }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
+5 -1
View File
@@ -1,6 +1,6 @@
/* FileSaver.js /* FileSaver.js
* A saveAs() FileSaver implementation. * A saveAs() FileSaver implementation.
* 2015-01-04 * 2015-03-04
* *
* By Eli Grey, http://eligrey.com * By Eli Grey, http://eligrey.com
* License: X11/MIT * License: X11/MIT
@@ -135,6 +135,10 @@ var saveAs = saveAs
revoke(object_url); revoke(object_url);
return; 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 // 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 // viewed in a tab, so I force save with application/octet-stream
// http://code.google.com/p/chromium/issues/detail?id=91158 // http://code.google.com/p/chromium/issues/detail?id=91158
File diff suppressed because one or more lines are too long
+2318 -1810
View File
File diff suppressed because one or more lines are too long
-12
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+123 -12
View File
@@ -29,6 +29,27 @@
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
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-default .badge,
.btn-primary .badge, .btn-primary .badge,
.btn-success .badge, .btn-success .badge,
@@ -64,8 +85,23 @@
border-color: #dbdbdb; border-color: #dbdbdb;
} }
.btn-default.disabled, .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-color: #e0e0e0;
background-image: none; background-image: none;
} }
@@ -90,8 +126,23 @@
border-color: #245580; border-color: #245580;
} }
.btn-primary.disabled, .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-color: #265a88;
background-image: none; background-image: none;
} }
@@ -116,8 +167,23 @@
border-color: #3e8f3e; border-color: #3e8f3e;
} }
.btn-success.disabled, .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-color: #419641;
background-image: none; background-image: none;
} }
@@ -142,8 +208,23 @@
border-color: #28a4c9; border-color: #28a4c9;
} }
.btn-info.disabled, .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-color: #2aabd2;
background-image: none; background-image: none;
} }
@@ -168,8 +249,23 @@
border-color: #e38d13; border-color: #e38d13;
} }
.btn-warning.disabled, .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-color: #eb9316;
background-image: none; background-image: none;
} }
@@ -194,8 +290,23 @@
border-color: #b92c28; border-color: #b92c28;
} }
.btn-danger.disabled, .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-color: #c12e2a;
background-image: none; background-image: none;
} }
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+48 -13
View File
@@ -4,7 +4,7 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * 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 { html {
font-family: sans-serif; font-family: sans-serif;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
@@ -239,9 +239,6 @@ th {
h3 { h3 {
page-break-after: avoid; page-break-after: avoid;
} }
select {
background: #fff !important;
}
.navbar { .navbar {
display: none; display: none;
} }
@@ -2739,7 +2736,7 @@ select[multiple].input-sm {
.form-group-sm .form-control-static { .form-group-sm .form-control-static {
height: 30px; height: 30px;
min-height: 32px; min-height: 32px;
padding: 5px 10px; padding: 6px 10px;
font-size: 12px; font-size: 12px;
line-height: 1.5; line-height: 1.5;
} }
@@ -2776,7 +2773,7 @@ select[multiple].input-lg {
.form-group-lg .form-control-static { .form-group-lg .form-control-static {
height: 46px; height: 46px;
min-height: 38px; min-height: 38px;
padding: 10px 16px; padding: 11px 16px;
font-size: 18px; font-size: 18px;
line-height: 1.3333333; line-height: 1.3333333;
} }
@@ -2799,13 +2796,15 @@ select[multiple].input-lg {
pointer-events: none; pointer-events: none;
} }
.input-lg + .form-control-feedback, .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; width: 46px;
height: 46px; height: 46px;
line-height: 46px; line-height: 46px;
} }
.input-sm + .form-control-feedback, .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; width: 30px;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
@@ -2991,11 +2990,13 @@ select[multiple].input-lg {
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label { .form-horizontal .form-group-lg .control-label {
padding-top: 14.333333px; padding-top: 14.333333px;
font-size: 18px;
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label { .form-horizontal .form-group-sm .control-label {
padding-top: 6px; padding-top: 6px;
font-size: 12px;
} }
} }
.btn { .btn {
@@ -3559,6 +3560,7 @@ tbody.collapse.in {
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: 4px dashed; border-top: 4px dashed;
border-top: 4px solid\9;
border-right: 4px solid transparent; border-right: 4px solid transparent;
border-left: 4px solid transparent; border-left: 4px solid transparent;
} }
@@ -3723,6 +3725,7 @@ tbody.collapse.in {
.btn-toolbar { .btn-toolbar {
margin-left: -5px; margin-left: -5px;
} }
.btn-toolbar .btn,
.btn-toolbar .btn-group, .btn-toolbar .btn-group,
.btn-toolbar .input-group { .btn-toolbar .input-group {
float: left; 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,
.input-group-btn:last-child > .btn-group { .input-group-btn:last-child > .btn-group {
z-index: 2;
margin-left: -1px; margin-left: -1px;
} }
.nav { .nav {
@@ -4788,6 +4792,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination > li > span:hover, .pagination > li > span:hover,
.pagination > li > a:focus, .pagination > li > a:focus,
.pagination > li > span:focus { .pagination > li > span:focus {
z-index: 3;
color: #23527c; color: #23527c;
background-color: #eee; background-color: #eee;
border-color: #ddd; border-color: #ddd;
@@ -4960,7 +4965,7 @@ a.label:focus {
color: #fff; color: #fff;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: middle;
background-color: #777; background-color: #777;
border-radius: 10px; border-radius: 10px;
} }
@@ -5247,6 +5252,9 @@ a.thumbnail.active {
.media-object { .media-object {
display: block; display: block;
} }
.media-object.img-thumbnail {
max-width: none;
}
.media-right, .media-right,
.media > .pull-right { .media > .pull-right {
padding-left: 10px; padding-left: 10px;
@@ -5506,6 +5514,10 @@ a.list-group-item-danger.active:focus {
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
border-bottom-left-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 { .panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0; border-top-width: 0;
} }
@@ -5987,10 +5999,23 @@ button.close {
display: block; display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
font-style: normal;
font-weight: 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); filter: alpha(opacity=0);
opacity: 0; opacity: 0;
line-break: auto;
} }
.tooltip.in { .tooltip.in {
filter: alpha(opacity=90); filter: alpha(opacity=90);
@@ -6017,7 +6042,6 @@ button.close {
padding: 3px 8px; padding: 3px 8px;
color: #fff; color: #fff;
text-align: center; text-align: center;
text-decoration: none;
background-color: #000; background-color: #000;
border-radius: 4px; border-radius: 4px;
} }
@@ -6094,9 +6118,18 @@ button.close {
padding: 1px; padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 14px;
font-style: normal;
font-weight: normal; font-weight: normal;
line-height: 1.42857143; line-height: 1.42857143;
text-align: left; 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; white-space: normal;
background-color: #fff; background-color: #fff;
-webkit-background-clip: padding-box; -webkit-background-clip: padding-box;
@@ -6106,6 +6139,8 @@ button.close {
border-radius: 6px; border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
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 { .popover.top {
margin-top: -10px; margin-top: -10px;
@@ -6233,8 +6268,8 @@ button.close {
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
backface-visibility: hidden; backface-visibility: hidden;
-webkit-perspective: 1000; -webkit-perspective: 1000px;
perspective: 1000; perspective: 1000px;
} }
.carousel-inner > .item.next, .carousel-inner > .item.next,
.carousel-inner > .item.active.right { .carousel-inner > .item.active.right {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+68 -57
View File
@@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') {
var val = $el.is('input') ? 'val' : 'html' var val = $el.is('input') ? 'val' : 'html'
var data = $el.data() var data = $el.data()
state = state + 'Text' state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]()) if (data.resetText == null) $el.data('resetText', $el[val]())
@@ -229,8 +229,8 @@ if (typeof jQuery === 'undefined') {
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false if ($input.prop('checked')) changed = false
else $parent.find('.active').removeClass('active') if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} else { } else {
@@ -280,7 +280,7 @@ if (typeof jQuery === 'undefined') {
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle') 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) { .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)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@@ -761,6 +761,40 @@ if (typeof jQuery === 'undefined') {
Dropdown.VERSION = '3.3.4' 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) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
@@ -810,7 +844,7 @@ if (typeof jQuery === 'undefined') {
var $parent = getParent($this) var $parent = getParent($this)
var isActive = $parent.hasClass('open') 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') if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click') return $this.trigger('click')
} }
@@ -822,47 +856,13 @@ if (typeof jQuery === 'undefined') {
var index = $items.index(e.target) var index = $items.index(e.target)
if (e.which == 38 && index > 0) index-- // up if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0 if (!~index) index = 0
$items.eq(index).trigger('focus') $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 // 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', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .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', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery); }(jQuery);
@@ -1295,7 +1294,7 @@ if (typeof jQuery === 'undefined') {
this.type = type this.type = type
this.$element = $(element) this.$element = $(element)
this.options = this.getOptions(options) 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) { 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!') 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) .data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition() var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
@@ -1437,13 +1437,12 @@ if (typeof jQuery === 'undefined') {
if (autoPlace) { if (autoPlace) {
var orgPlacement = placement var orgPlacement = placement
var $container = this.options.container ? $(this.options.container) : this.$element.parent() var viewportDim = this.getPosition(this.$viewport)
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' : placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' : placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement placement
$tip $tip
@@ -1484,8 +1483,8 @@ if (typeof jQuery === 'undefined') {
if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0 if (isNaN(marginLeft)) marginLeft = 0
offset.top = offset.top + marginTop offset.top += marginTop
offset.left = offset.left + marginLeft offset.left += marginLeft
// $.fn.offset doesn't round pixel values // $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0 // so we use setOffset directly with our own function B-0
@@ -1567,7 +1566,7 @@ if (typeof jQuery === 'undefined') {
Tooltip.prototype.fixTitle = function () { Tooltip.prototype.fixTitle = function () {
var $e = this.$element 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', '') $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
} }
} }
@@ -1622,7 +1621,7 @@ if (typeof jQuery === 'undefined') {
var rightEdgeOffset = pos.left + viewportPadding + actualWidth var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset 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 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
} }
} }
@@ -1648,7 +1647,13 @@ if (typeof jQuery === 'undefined') {
} }
Tooltip.prototype.tip = function () { 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 () { Tooltip.prototype.arrow = function () {
@@ -1685,6 +1690,12 @@ if (typeof jQuery === 'undefined') {
clearTimeout(this.timeout) clearTimeout(this.timeout)
this.hide(function () { this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type) 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 $active = container.find('> .active')
var transition = callback var transition = callback
&& $.support.transition && $.support.transition
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() { function next() {
$active $active
+3 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -209,7 +209,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.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! --> <!-- 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 --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script> <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body> </body>
+1 -1
View File
@@ -241,7 +241,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.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! --> <!-- 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 --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script> <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body> </body>
@@ -202,3 +202,61 @@ body,
.navbar-form .has-feedback .form-control-feedback { .navbar-form .has-feedback .form-control-feedback {
top: 0; 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;
}
+9 -2
View File
@@ -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'; 'use strict';
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
@@ -15,8 +23,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath)
var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
try { try {
fs.writeFileSync(destFilepath, moduleOutputJs); fs.writeFileSync(destFilepath, moduleOutputJs);
} } catch (err) {
catch (err) {
grunt.fail.warn(err); grunt.fail.warn(err);
} }
grunt.log.writeln('File ' + destFilepath.cyan + ' created.'); grunt.log.writeln('File ' + destFilepath.cyan + ' created.');
+4 -3
View File
@@ -1,10 +1,12 @@
/*! /*!
* Bootstrap Grunt task for Glyphicons data generation * Bootstrap Grunt task for Glyphicons data generation
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2014 Twitter, Inc. * Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
'use strict'; 'use strict';
var fs = require('fs'); var fs = require('fs');
module.exports = function generateGlyphiconsData(grunt) { module.exports = function generateGlyphiconsData(grunt) {
@@ -33,8 +35,7 @@ module.exports = function generateGlyphiconsData(grunt) {
try { try {
fs.writeFileSync(glyphiconsYml, glyphiconsData); fs.writeFileSync(glyphiconsYml, glyphiconsData);
} } catch (err) {
catch (err) {
grunt.fail.warn(err); grunt.fail.warn(err);
} }
grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');
+6 -7
View File
@@ -1,9 +1,10 @@
/*! /*!
* Bootstrap Grunt task for parsing Less docstrings * Bootstrap Grunt task for parsing Less docstrings
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2014 Twitter, Inc. * Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
'use strict'; 'use strict';
var Markdown = require('markdown-it'); var Markdown = require('markdown-it');
@@ -121,7 +122,7 @@ Tokenizer.prototype._shift = function () {
return new VarDocstring(match[1]); return new VarDocstring(match[1]);
} }
var commentStart = line.lastIndexOf('//'); 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); match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) { if (match !== null) {
return new Variable(match[1], match[2]); return new Variable(match[1], match[2]);
@@ -168,8 +169,7 @@ Parser.prototype.parseSection = function () {
var docstring = this._tokenizer.shift(); var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) { if (docstring instanceof SectionDocstring) {
section.docstring = docstring; section.docstring = docstring;
} } else {
else {
this._tokenizer.unshift(docstring); this._tokenizer.unshift(docstring);
} }
this.parseSubSections(section); this.parseSubSections(section);
@@ -185,15 +185,14 @@ Parser.prototype.parseSubSections = function (section) {
// Presume an implicit initial subsection // Presume an implicit initial subsection
subsection = new SubSection(''); subsection = new SubSection('');
this.parseVars(subsection); this.parseVars(subsection);
} } else {
else {
break; break;
} }
} }
section.addSubSection(subsection); 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 // Ignore lone empty implicit subsection
section.subsections = []; section.subsections = [];
} }
+6 -8
View File
@@ -1,28 +1,27 @@
/*! /*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer * Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2014 Twitter, Inc. * Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
/* global btoa: true */
'use strict'; 'use strict';
var fs = require('fs'); var fs = require('fs');
var btoa = require('btoa'); var btoa = require('btoa');
var glob = require('glob'); var glob = require('glob');
function getFiles(type) { function getFiles(type) {
var files = {}; var files = {};
var recursive = (type === 'less'); var recursive = type === 'less';
var globExpr = (recursive ? '/**/*' : '/*'); var globExpr = recursive ? '/**/*' : '/*';
glob.sync(type + globExpr) glob.sync(type + globExpr)
.filter(function (path) { .filter(function (path) {
return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path);
}) })
.forEach(function (fullPath) { .forEach(function (fullPath) {
var relativePath = fullPath.replace(/^[^/]+\//, ''); 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'; 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'; var rawFilesJs = 'docs/assets/js/raw-files.min.js';
try { try {
fs.writeFileSync(rawFilesJs, files); fs.writeFileSync(rawFilesJs, files);
} } catch (err) {
catch (err) {
grunt.fail.warn(err); grunt.fail.warn(err);
} }
grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.'); grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');
+1 -1
View File
@@ -11,7 +11,7 @@
"../assets/js/src/customizer.js" "../assets/js/src/customizer.js"
], ],
"docsJs": [ "docsJs": [
"../assets/js/vendor/holder.js", "../assets/js/vendor/holder.min.js",
"../assets/js/vendor/ZeroClipboard.min.js", "../assets/js/vendor/ZeroClipboard.min.js",
"../assets/js/vendor/anchor.js", "../assets/js/vendor/anchor.js",
"../assets/js/src/application.js" "../assets/js/src/application.js"
+1 -1
View File
@@ -57,7 +57,7 @@
{ {
browserName: "iphone", browserName: "iphone",
platform: "OS X 10.10", platform: "OS X 10.10",
version: "8.1" version: "8.2"
}, },
# iOS Chrome not currently supported by Sauce Labs # iOS Chrome not currently supported by Sauce Labs
+4 -4
View File
@@ -31,7 +31,7 @@
var val = $el.is('input') ? 'val' : 'html' var val = $el.is('input') ? 'val' : 'html'
var data = $el.data() var data = $el.data()
state = state + 'Text' state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]()) if (data.resetText == null) $el.data('resetText', $el[val]())
@@ -56,8 +56,8 @@
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false if ($input.prop('checked')) changed = false
else $parent.find('.active').removeClass('active') if (!$input.prop('checked') || !this.$element.hasClass('active')) $parent.find('.active').removeClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} else { } else {
@@ -107,7 +107,7 @@
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle') 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) { .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)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
+39 -40
View File
@@ -21,6 +21,40 @@
Dropdown.VERSION = '3.3.4' 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) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
@@ -70,7 +104,7 @@
var $parent = getParent($this) var $parent = getParent($this)
var isActive = $parent.hasClass('open') 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') if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click') return $this.trigger('click')
} }
@@ -82,47 +116,13 @@
var index = $items.index(e.target) var index = $items.index(e.target)
if (e.which == 38 && index > 0) index-- // up if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0 if (!~index) index = 0
$items.eq(index).trigger('focus') $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 // 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', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .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', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery); }(jQuery);
+1 -1
View File
@@ -65,7 +65,7 @@
var $active = container.find('> .active') var $active = container.find('> .active')
var transition = callback var transition = callback
&& $.support.transition && $.support.transition
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() { function next() {
$active $active
+2 -2
View File
@@ -167,13 +167,13 @@ $(function () {
assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked') assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked')
$btn2.find('input').trigger('click') $btn2.find('input').trigger('click')
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class') 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.hasClass('active'), 'btn2 has active class')
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked') 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 $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.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.hasClass('active'), 'btn2 has active class')
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked') assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
}) })
+28
View File
@@ -259,4 +259,32 @@ $(function () {
assert.strictEqual($popover.data('bs.popover'), undefined, 'should not initialize the popover') 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')
})
}) })
+116 -12
View File
@@ -139,6 +139,20 @@ $(function () {
.bootstrapTooltip('show') .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) { QUnit.test('should fire shown event', function (assert) {
assert.expect(1) assert.expect(1)
var done = assert.async() var done = assert.async()
@@ -362,23 +376,19 @@ $(function () {
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom') 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) 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/>') var $container = $('<div/>')
.css({ .css({
position: 'absolute', position: 'relative',
overflow: 'hidden', height: '100%'
width: 600,
height: 400,
top: 0,
left: 0
}) })
.appendTo(document.body) .appendTo('#qunit-fixture')
var $topTooltip = $('<div style="left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>') var $topTooltip = $('<div style="left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>')
.appendTo($container) .appendTo($container)
.bootstrapTooltip({ placement: 'auto' }) .bootstrapTooltip({ placement: 'auto', viewport: '#qunit-fixture' })
$topTooltip.bootstrapTooltip('show') $topTooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.bottom'), 'top positioned tooltip is dynamically positioned to bottom') 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>') var $rightTooltip = $('<div style="right: 0;" rel="tooltip" title="Right tooltip">Right Dynamic Tooltip</div>')
.appendTo($container) .appendTo($container)
.bootstrapTooltip({ placement: 'right auto' }) .bootstrapTooltip({ placement: 'right auto', viewport: '#qunit-fixture' })
$rightTooltip.bootstrapTooltip('show') $rightTooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.left'), 'right positioned tooltip is dynamically positioned left') 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>') var $leftTooltip = $('<div style="left: 0;" rel="tooltip" title="Left tooltip">Left Dynamic Tooltip</div>')
.appendTo($container) .appendTo($container)
.bootstrapTooltip({ placement: 'auto left' }) .bootstrapTooltip({ placement: 'auto left', viewport: '#qunit-fixture' })
$leftTooltip.bootstrapTooltip('show') $leftTooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.right'), 'left positioned tooltip is dynamically positioned right') assert.ok($('.tooltip').is('.right'), 'left positioned tooltip is dynamically positioned right')
@@ -436,6 +446,31 @@ $(function () {
$styles.remove() $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) { 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) assert.expect(2)
var styles = '<style>' var styles = '<style>'
@@ -719,6 +754,65 @@ $(function () {
$styles.remove() $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) { 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) assert.expect(1)
var passed = true var passed = true
@@ -1180,4 +1274,14 @@ $(function () {
assert.strictEqual($tooltip.data('bs.tooltip'), undefined, 'should not initialize the tooltip') 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!'))
})
}) })
+24 -12
View File
@@ -50,7 +50,7 @@
this.type = type this.type = type
this.$element = $(element) this.$element = $(element)
this.options = this.getOptions(options) 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) { 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!') 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) .data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition() var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
@@ -192,13 +193,12 @@
if (autoPlace) { if (autoPlace) {
var orgPlacement = placement var orgPlacement = placement
var $container = this.options.container ? $(this.options.container) : this.$element.parent() var viewportDim = this.getPosition(this.$viewport)
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' : placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' : placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement placement
$tip $tip
@@ -239,8 +239,8 @@
if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0 if (isNaN(marginLeft)) marginLeft = 0
offset.top = offset.top + marginTop offset.top += marginTop
offset.left = offset.left + marginLeft offset.left += marginLeft
// $.fn.offset doesn't round pixel values // $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0 // so we use setOffset directly with our own function B-0
@@ -322,7 +322,7 @@
Tooltip.prototype.fixTitle = function () { Tooltip.prototype.fixTitle = function () {
var $e = this.$element 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', '') $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
} }
} }
@@ -377,7 +377,7 @@
var rightEdgeOffset = pos.left + viewportPadding + actualWidth var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset 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 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
} }
} }
@@ -403,7 +403,13 @@
} }
Tooltip.prototype.tip = function () { 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 () { Tooltip.prototype.arrow = function () {
@@ -440,6 +446,12 @@
clearTimeout(this.timeout) clearTimeout(this.timeout)
this.hide(function () { this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type) that.$element.off('.' + that.type).removeData('bs.' + that.type)
if (that.$tip) {
that.$tip.detach()
}
that.$tip = null
that.$arrow = null
that.$viewport = null
}) })
} }
+1 -1
View File
@@ -12,7 +12,7 @@
font-weight: @badge-font-weight; font-weight: @badge-font-weight;
color: @badge-color; color: @badge-color;
line-height: @badge-line-height; line-height: @badge-line-height;
vertical-align: baseline; vertical-align: middle;
white-space: nowrap; white-space: nowrap;
text-align: center; text-align: center;
background-color: @badge-bg; background-color: @badge-bg;
+1
View File
@@ -36,6 +36,7 @@
margin-left: -5px; // Offset the first child's margin margin-left: -5px; // Offset the first child's margin
&:extend(.clearfix all); &:extend(.clearfix all);
.btn,
.btn-group, .btn-group,
.input-group { .input-group {
float: left; float: left;
+1 -1
View File
@@ -29,7 +29,7 @@
@media all and (transform-3d), (-webkit-transform-3d) { @media all and (transform-3d), (-webkit-transform-3d) {
.transition-transform(~'0.6s ease-in-out'); .transition-transform(~'0.6s ease-in-out');
.backface-visibility(~'hidden'); .backface-visibility(~'hidden');
.perspective(1000); .perspective(1000px);
&.next, &.next,
&.active.right { &.active.right {
+1
View File
@@ -11,6 +11,7 @@
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: @caret-width-base dashed; border-top: @caret-width-base dashed;
border-top: @caret-width-base ~"solid\9"; // IE8
border-right: @caret-width-base solid transparent; border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent;
} }
+11 -8
View File
@@ -56,7 +56,6 @@ input[type="checkbox"] {
line-height: normal; line-height: normal;
} }
// Set the height of file controls to match text inputs
input[type="file"] { input[type="file"] {
display: block; display: block;
} }
@@ -338,10 +337,10 @@ input[type="checkbox"] {
} }
.form-control-static { .form-control-static {
height: @input-height-small; 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; font-size: @font-size-small;
line-height: @line-height-small; line-height: @line-height-small;
min-height: (@line-height-computed + @font-size-small);
} }
} }
@@ -366,10 +365,10 @@ input[type="checkbox"] {
} }
.form-control-static { .form-control-static {
height: @input-height-large; 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; font-size: @font-size-large;
line-height: @line-height-large; line-height: @line-height-large;
min-height: (@line-height-computed + @font-size-large);
} }
} }
@@ -401,13 +400,15 @@ input[type="checkbox"] {
pointer-events: none; pointer-events: none;
} }
.input-lg + .form-control-feedback, .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; width: @input-height-large;
height: @input-height-large; height: @input-height-large;
line-height: @input-height-large; line-height: @input-height-large;
} }
.input-sm + .form-control-feedback, .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; width: @input-height-small;
height: @input-height-small; height: @input-height-small;
line-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 // 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. // `position: relative;` on them. Also accounts for the grid gutter padding.
.has-feedback .form-control-feedback { .has-feedback .form-control-feedback {
right: (@grid-gutter-width / 2); right: floor((@grid-gutter-width / 2));
} }
// Form group sizes // Form group sizes
@@ -587,6 +588,7 @@ input[type="checkbox"] {
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
.control-label { .control-label {
padding-top: ((@padding-large-vertical * @line-height-large) + 1); 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) { @media (min-width: @screen-sm-min) {
.control-label { .control-label {
padding-top: (@padding-small-vertical + 1); padding-top: (@padding-small-vertical + 1);
font-size: @font-size-small;
} }
} }
} }
+1
View File
@@ -160,6 +160,7 @@
&:last-child { &:last-child {
> .btn, > .btn,
> .btn-group { > .btn-group {
z-index: 2;
margin-left: -1px; margin-left: -1px;
} }
} }
+5
View File
@@ -19,6 +19,11 @@
.media-object { .media-object {
display: block; display: block;
// Fix collapse in webkit from max-width: 100% and display: table-cell.
&.img-thumbnail {
max-width: none;
}
} }
.media-right, .media-right,
+1
View File
@@ -11,6 +11,7 @@
@import "mixins/responsive-visibility.less"; @import "mixins/responsive-visibility.less";
@import "mixins/size.less"; @import "mixins/size.less";
@import "mixins/tab-focus.less"; @import "mixins/tab-focus.less";
@import "mixins/reset-text.less";
@import "mixins/text-emphasis.less"; @import "mixins/text-emphasis.less";
@import "mixins/text-overflow.less"; @import "mixins/text-overflow.less";
@import "mixins/vendor-prefixes.less"; @import "mixins/vendor-prefixes.less";
+2 -2
View File
@@ -19,8 +19,8 @@
// Prevent columns from collapsing when empty // Prevent columns from collapsing when empty
min-height: 1px; min-height: 1px;
// Inner gutter via padding // Inner gutter via padding
padding-left: (@grid-gutter-width / 2); padding-left: ceil((@grid-gutter-width / 2));
padding-right: (@grid-gutter-width / 2); padding-right: floor((@grid-gutter-width / 2));
} }
} }
.col(1); // kickstart it .col(1); // kickstart it
+2 -2
View File
@@ -13,8 +13,8 @@
// Creates a wrapper for a series of columns // Creates a wrapper for a series of columns
.make-row(@gutter: @grid-gutter-width) { .make-row(@gutter: @grid-gutter-width) {
margin-left: (@gutter / -2); margin-left: ceil((@gutter / -2));
margin-right: (@gutter / -2); margin-right: floor((@gutter / -2));
&:extend(.clearfix all); &:extend(.clearfix all);
} }
+18
View 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;
}
+8 -11
View File
@@ -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. // 1. Set default font family to sans-serif.
// 2. Prevent iOS text size adjust after orientation change, without disabling // 2. Prevent iOS and IE text size adjust after device orientation change,
// user zoom. // without disabling user zoom.
// //
html { html {
@@ -71,7 +71,7 @@ audio:not([controls]) {
// //
// Address `[hidden]` styling not present in IE 8/9/10. // 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], [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, a:active,
@@ -209,7 +210,6 @@ figure {
// //
hr { hr {
-moz-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
height: 0; height: 0;
} }
@@ -350,15 +350,12 @@ input[type="number"]::-webkit-outer-spin-button {
// //
// 1. Address `appearance` set to `searchfield` in Safari and Chrome. // 1. Address `appearance` set to `searchfield` in Safari and Chrome.
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome // 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
// (include `-moz` to future-proof).
// //
input[type="search"] { input[type="search"] {
-webkit-appearance: textfield; // 1 -webkit-appearance: textfield; // 1
-moz-box-sizing: content-box; box-sizing: content-box; //2
-webkit-box-sizing: content-box; // 2
box-sizing: content-box;
} }
// //
+1
View File
@@ -40,6 +40,7 @@
> li > span { > li > span {
&:hover, &:hover,
&:focus { &:focus {
z-index: 3;
color: @pagination-hover-color; color: @pagination-hover-color;
background-color: @pagination-hover-bg; background-color: @pagination-hover-bg;
border-color: @pagination-hover-border; border-color: @pagination-hover-border;
+6
View File
@@ -76,6 +76,7 @@
.border-top-radius((@panel-border-radius - 1)); .border-top-radius((@panel-border-radius - 1));
} }
} }
// Add border bottom radius for last one // Add border bottom radius for last one
&:last-child { &:last-child {
.list-group-item: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. // Collapse space between when there's no additional content.
.panel-heading + .list-group { .panel-heading + .list-group {
+4 -8
View File
@@ -11,12 +11,11 @@
display: none; display: none;
max-width: @popover-max-width; max-width: @popover-max-width;
padding: 1px; padding: 1px;
// Reset font and text properties given new insertion method // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
font-family: @font-family-base; // So reset our font and text properties to avoid inheriting weird values.
.reset-text();
font-size: @font-size-base; font-size: @font-size-base;
font-weight: normal;
line-height: @line-height-base;
text-align: left;
background-color: @popover-bg; background-color: @popover-bg;
background-clip: padding-box; background-clip: padding-box;
border: 1px solid @popover-fallback-border-color; border: 1px solid @popover-fallback-border-color;
@@ -24,9 +23,6 @@
border-radius: @border-radius-large; border-radius: @border-radius-large;
.box-shadow(0 5px 10px rgba(0,0,0,.2)); .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 // Offset the popover to account for the popover arrow
&.top { margin-top: -@popover-arrow-width; } &.top { margin-top: -@popover-arrow-width; }
&.right { margin-left: @popover-arrow-width; } &.right { margin-left: @popover-arrow-width; }
-6
View File
@@ -67,12 +67,6 @@
} }
// Bootstrap specific changes start // 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 // Bootstrap components
.navbar { .navbar {
-1
View File
@@ -155,7 +155,6 @@ hr {
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well) // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
// for traditionally non-focusable elements with role="button" // for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile // 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"] { [role="button"] {
cursor: pointer; cursor: pointer;
+17 -4
View File
@@ -28,6 +28,12 @@
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
} }
&.disabled,
&[disabled],
fieldset[disabled] & {
.box-shadow(none);
}
.badge { .badge {
text-shadow: none; text-shadow: none;
} }
@@ -53,10 +59,17 @@
} }
&.disabled, &.disabled,
&:disabled, &[disabled],
&[disabled] { fieldset[disabled] & {
background-color: darken(@btn-color, 12%); &,
background-image: none; &:hover,
&:focus,
&.focus,
&:active,
&.active {
background-color: darken(@btn-color, 12%);
background-image: none;
}
} }
} }
+4 -5
View File
@@ -8,11 +8,11 @@
position: absolute; position: absolute;
z-index: @zindex-tooltip; z-index: @zindex-tooltip;
display: block; display: block;
// Reset font and text properties given new insertion method // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
font-family: @font-family-base; // So reset our font and text properties to avoid inheriting weird values.
.reset-text();
font-size: @font-size-small; font-size: @font-size-small;
font-weight: normal;
line-height: 1.4;
.opacity(0); .opacity(0);
&.in { .opacity(@tooltip-opacity); } &.in { .opacity(@tooltip-opacity); }
@@ -28,7 +28,6 @@
padding: 3px 8px; padding: 3px 8px;
color: @tooltip-color; color: @tooltip-color;
text-align: center; text-align: center;
text-decoration: none;
background-color: @tooltip-bg; background-color: @tooltip-bg;
border-radius: @border-radius-base; border-radius: @border-radius-base;
} }
+4 -1
View File
@@ -1,5 +1,8 @@
// package metadata file for Meteor.js // package metadata file for Meteor.js
/* jshint strict:false */
/* global Package:true */
Package.describe({ Package.describe({
name: 'twbs:bootstrap', // http://atmospherejs.com/twbs/bootstrap name: 'twbs:bootstrap', // http://atmospherejs.com/twbs/bootstrap
summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.', 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.woff',
'dist/fonts/glyphicons-halflings-regular.woff2', 'dist/fonts/glyphicons-halflings-regular.woff2',
'dist/css/bootstrap.css', 'dist/css/bootstrap.css',
'dist/js/bootstrap.js', 'dist/js/bootstrap.js'
], 'client'); ], 'client');
}); });
+19 -14
View File
@@ -32,34 +32,35 @@
}, },
"devDependencies": { "devDependencies": {
"btoa": "~1.1.2", "btoa": "~1.1.2",
"glob": "~5.0.3", "glob": "~5.0.5",
"grunt": "~0.4.5", "grunt": "~0.4.5",
"grunt-autoprefixer": "~2.2.0", "grunt-autoprefixer": "~3.0.0",
"grunt-banner": "~0.3.1", "grunt-banner": "~0.3.1",
"grunt-contrib-clean": "~0.6.0", "grunt-contrib-clean": "~0.6.0",
"grunt-contrib-compress": "~0.13.0", "grunt-contrib-compress": "~0.13.0",
"grunt-contrib-concat": "~0.5.1", "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-copy": "~0.8.0",
"grunt-contrib-csslint": "~0.4.0", "grunt-contrib-csslint": "~0.4.0",
"grunt-contrib-cssmin": "~0.12.2", "grunt-contrib-cssmin": "~0.12.2",
"grunt-contrib-htmlmin": "~0.4.0",
"grunt-contrib-jade": "~0.14.1", "grunt-contrib-jade": "~0.14.1",
"grunt-contrib-jshint": "~0.11.0", "grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-less": "~1.0.0", "grunt-contrib-less": "~1.0.1",
"grunt-contrib-qunit": "~0.5.2", "grunt-contrib-qunit": "~0.7.0",
"grunt-contrib-uglify": "~0.8.0", "grunt-contrib-uglify": "~0.9.1",
"grunt-contrib-watch": "~0.6.1", "grunt-contrib-watch": "~0.6.1",
"grunt-csscomb": "~3.0.0", "grunt-csscomb": "~3.0.0",
"grunt-exec": "~0.4.6", "grunt-exec": "~0.4.6",
"grunt-html": "~4.0.1", "grunt-html": "~4.0.2",
"grunt-jekyll": "~0.4.2", "grunt-jekyll": "~0.4.2",
"grunt-jscs": "~1.5.0", "grunt-jscs": "~1.6.0",
"grunt-saucelabs": "~8.6.0", "grunt-saucelabs": "~8.6.1",
"grunt-sed": "~0.1.1", "grunt-sed": "twbs/grunt-sed#v0.2.0",
"load-grunt-tasks": "~3.1.0", "load-grunt-tasks": "~3.1.0",
"markdown-it": "^4.0.1", "markdown-it": "^4.1.1",
"npm-shrinkwrap": "^200.1.0", "npm-shrinkwrap": "^200.1.0",
"time-grunt": "^1.1.0" "time-grunt": "^1.1.1"
}, },
"engines": { "engines": {
"node": ">=0.10.1" "node": ">=0.10.1"
@@ -82,6 +83,10 @@
"exports": "$" "exports": "$"
} }
}, },
"files": ["css", "fonts", "js"] "files": [
"css",
"fonts",
"js"
]
} }
} }
+1197 -516
View File
File diff suppressed because it is too large Load Diff