Commit 0aa01f63 authored by fat's avatar fat

Merge branch 'master' into fix-13386

Conflicts:
	js/carousel.js
parents f071549c b31c35b6
...@@ -2,7 +2,7 @@ language: node_js ...@@ -2,7 +2,7 @@ language: node_js
node_js: node_js:
- "0.10" - "0.10"
before_install: before_install:
- time sudo pip install --use-mirrors -r test-infra/requirements.txt - time travis_retry sudo pip install -r test-infra/requirements.txt
- rvm use 1.9.3 --fuzzy - rvm use 1.9.3 --fuzzy
- export GEMDIR=$(rvm gemdir) - export GEMDIR=$(rvm gemdir)
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi - if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
......
...@@ -17,10 +17,10 @@ module.exports = function (grunt) { ...@@ -17,10 +17,10 @@ module.exports = function (grunt) {
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
var npmShrinkwrap = require('npm-shrinkwrap');
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js'); var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js'); var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var generateRawFiles = require('./grunt/bs-raw-files-generator.js'); var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
var updateShrinkwrap = require('./grunt/shrinkwrap.js');
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
...@@ -32,6 +32,7 @@ module.exports = function (grunt) { ...@@ -32,6 +32,7 @@ module.exports = function (grunt) {
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' + ' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' */\n', ' */\n',
// NOTE: This jqueryCheck code is duplicated in customizer.js; if making changes here, be sure to update the other copy too.
jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n', jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',
// Task configuration. // Task configuration.
...@@ -109,17 +110,14 @@ module.exports = function (grunt) { ...@@ -109,17 +110,14 @@ module.exports = function (grunt) {
}, },
uglify: { uglify: {
options: {
preserveComments: 'some'
},
bootstrap: { bootstrap: {
options: {
banner: '<%= banner %>'
},
src: '<%= concat.bootstrap.dest %>', src: '<%= concat.bootstrap.dest %>',
dest: 'dist/js/<%= pkg.name %>.min.js' dest: 'dist/js/<%= pkg.name %>.min.js'
}, },
customize: { customize: {
options: {
preserveComments: 'some'
},
src: [ src: [
'docs/assets/js/_vendor/less.min.js', 'docs/assets/js/_vendor/less.min.js',
'docs/assets/js/_vendor/jszip.min.js', 'docs/assets/js/_vendor/jszip.min.js',
...@@ -132,9 +130,6 @@ module.exports = function (grunt) { ...@@ -132,9 +130,6 @@ module.exports = function (grunt) {
dest: 'docs/assets/js/customize.min.js' dest: 'docs/assets/js/customize.min.js'
}, },
docsJs: { docsJs: {
options: {
preserveComments: 'some'
},
src: [ src: [
'docs/assets/js/_vendor/holder.js', 'docs/assets/js/_vendor/holder.js',
'docs/assets/js/_vendor/ZeroClipboard.min.js', 'docs/assets/js/_vendor/ZeroClipboard.min.js',
...@@ -180,7 +175,16 @@ module.exports = function (grunt) { ...@@ -180,7 +175,16 @@ module.exports = function (grunt) {
autoprefixer: { autoprefixer: {
options: { options: {
browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12'] browsers: [
'Android 2.3',
'Android >= 4',
'Chrome >= 20',
'Firefox >= 24', // Firefox 24 is the latest ESR
'Explorer >= 8',
'iOS >= 6',
'Opera >= 12',
'Safari >= 6'
]
}, },
core: { core: {
options: { options: {
...@@ -383,9 +387,6 @@ module.exports = function (grunt) { ...@@ -383,9 +387,6 @@ module.exports = function (grunt) {
exec: { exec: {
npmUpdate: { npmUpdate: {
command: 'npm update' command: 'npm update'
},
npmShrinkWrap: {
command: 'npm shrinkwrap --dev'
} }
} }
}); });
...@@ -459,7 +460,19 @@ module.exports = function (grunt) { ...@@ -459,7 +460,19 @@ module.exports = function (grunt) {
generateRawFiles(grunt, banner); generateRawFiles(grunt, banner);
}); });
// Task for updating the npm packages used by the Travis build. // Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '_update-shrinkwrap']); // This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
grunt.registerTask('_update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); }); grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']);
grunt.registerTask('_update-shrinkwrap', function () {
var done = this.async();
npmShrinkwrap({ dev: true, dirname: __dirname }, function (err) {
if (err) {
grunt.fail.warn(err)
}
var dest = 'test-infra/npm-shrinkwrap.json';
fs.renameSync('npm-shrinkwrap.json', dest);
grunt.log.writeln('File ' + dest.cyan + ' updated.');
done();
});
});
}; };
# [Bootstrap](http://getbootstrap.com) # [Bootstrap](http://getbootstrap.com)
[![Bower version](https://badge.fury.io/bo/bootstrap.svg)](http://badge.fury.io/bo/bootstrap) [![NPM version](https://badge.fury.io/js/bootstrap.svg)](http://badge.fury.io/js/bootstrap) [![Build Status](https://secure.travis-ci.org/twbs/bootstrap.svg?branch=master)](http://travis-ci.org/twbs/bootstrap) [![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.svg?theme=.io)](https://david-dm.org/twbs/bootstrap#info=devDependencies) [![Bower version](https://badge.fury.io/bo/bootstrap.svg)](http://badge.fury.io/bo/bootstrap)
[![NPM version](https://badge.fury.io/js/bootstrap.svg)](http://badge.fury.io/js/bootstrap)
[![Build Status](https://secure.travis-ci.org/twbs/bootstrap.svg?branch=master)](http://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap) [![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community. Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community.
......
...@@ -55,6 +55,11 @@ ...@@ -55,6 +55,11 @@
background-color: #e0e0e0; background-color: #e0e0e0;
border-color: #dbdbdb; border-color: #dbdbdb;
} }
.btn-default:disabled,
.btn-default[disabled] {
background-color: #e0e0e0;
background-image: none;
}
.btn-primary { .btn-primary {
background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
background-image: -o-linear-gradient(top, #428bca 0%, #2d6ca2 100%); background-image: -o-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
...@@ -75,6 +80,11 @@ ...@@ -75,6 +80,11 @@
background-color: #2d6ca2; background-color: #2d6ca2;
border-color: #2b669a; border-color: #2b669a;
} }
.btn-primary:disabled,
.btn-primary[disabled] {
background-color: #2d6ca2;
background-image: none;
}
.btn-success { .btn-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
...@@ -95,6 +105,11 @@ ...@@ -95,6 +105,11 @@
background-color: #419641; background-color: #419641;
border-color: #3e8f3e; border-color: #3e8f3e;
} }
.btn-success:disabled,
.btn-success[disabled] {
background-color: #419641;
background-image: none;
}
.btn-info { .btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
...@@ -115,6 +130,11 @@ ...@@ -115,6 +130,11 @@
background-color: #2aabd2; background-color: #2aabd2;
border-color: #28a4c9; border-color: #28a4c9;
} }
.btn-info:disabled,
.btn-info[disabled] {
background-color: #2aabd2;
background-image: none;
}
.btn-warning { .btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
...@@ -135,6 +155,11 @@ ...@@ -135,6 +155,11 @@
background-color: #eb9316; background-color: #eb9316;
border-color: #e38d13; border-color: #e38d13;
} }
.btn-warning:disabled,
.btn-warning[disabled] {
background-color: #eb9316;
background-image: none;
}
.btn-danger { .btn-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
...@@ -155,6 +180,11 @@ ...@@ -155,6 +180,11 @@
background-color: #c12e2a; background-color: #c12e2a;
border-color: #b92c28; border-color: #b92c28;
} }
.btn-danger:disabled,
.btn-danger[disabled] {
background-color: #c12e2a;
background-image: none;
}
.thumbnail, .thumbnail,
.img-thumbnail { .img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
...@@ -324,6 +354,11 @@ ...@@ -324,6 +354,11 @@
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
background-repeat: repeat-x; background-repeat: repeat-x;
} }
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group { .list-group {
border-radius: 4px; border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
......
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
...@@ -935,6 +935,7 @@ img { ...@@ -935,6 +935,7 @@ img {
.carousel-inner > .item > img, .carousel-inner > .item > img,
.carousel-inner > .item > a > img { .carousel-inner > .item > a > img {
display: block; display: block;
width: 100% \9;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
...@@ -943,6 +944,7 @@ img { ...@@ -943,6 +944,7 @@ img {
} }
.img-thumbnail { .img-thumbnail {
display: inline-block; display: inline-block;
width: 100% \9;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
padding: 4px; padding: 4px;
...@@ -1025,7 +1027,7 @@ h6 .small, ...@@ -1025,7 +1027,7 @@ h6 .small,
.h6 .small { .h6 .small {
font-weight: normal; font-weight: normal;
line-height: 1; line-height: 1;
color: #999; color: #777;
} }
h1, h1,
.h1, .h1,
...@@ -1148,7 +1150,7 @@ mark, ...@@ -1148,7 +1150,7 @@ mark,
text-transform: capitalize; text-transform: capitalize;
} }
.text-muted { .text-muted {
color: #999; color: #777;
} }
.text-primary { .text-primary {
color: #428bca; color: #428bca;
...@@ -1272,7 +1274,7 @@ dd { ...@@ -1272,7 +1274,7 @@ dd {
abbr[title], abbr[title],
abbr[data-original-title] { abbr[data-original-title] {
cursor: help; cursor: help;
border-bottom: 1px dotted #999; border-bottom: 1px dotted #777;
} }
.initialism { .initialism {
font-size: 90%; font-size: 90%;
...@@ -1295,7 +1297,7 @@ blockquote .small { ...@@ -1295,7 +1297,7 @@ blockquote .small {
display: block; display: block;
font-size: 80%; font-size: 80%;
line-height: 1.42857143; line-height: 1.42857143;
color: #999; color: #777;
} }
blockquote footer:before, blockquote footer:before,
blockquote small:before, blockquote small:before,
...@@ -2373,14 +2375,14 @@ output { ...@@ -2373,14 +2375,14 @@ output {
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
} }
.form-control::-moz-placeholder { .form-control::-moz-placeholder {
color: #999; color: #777;
opacity: 1; opacity: 1;
} }
.form-control:-ms-input-placeholder { .form-control:-ms-input-placeholder {
color: #999; color: #777;
} }
.form-control::-webkit-input-placeholder { .form-control::-webkit-input-placeholder {
color: #999; color: #777;
} }
.form-control[disabled], .form-control[disabled],
.form-control[readonly], .form-control[readonly],
...@@ -2478,7 +2480,18 @@ fieldset[disabled] .radio label, ...@@ -2478,7 +2480,18 @@ fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label { fieldset[disabled] .checkbox label {
cursor: not-allowed; cursor: not-allowed;
} }
.input-sm { .form-control-static {
padding-top: 7px;
padding-bottom: 7px;
margin-bottom: 0;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding-right: 0;
padding-left: 0;
}
.input-sm,
.form-horizontal .form-group-sm .form-control {
height: 30px; height: 30px;
padding: 5px 10px; padding: 5px 10px;
font-size: 12px; font-size: 12px;
...@@ -2493,7 +2506,8 @@ textarea.input-sm, ...@@ -2493,7 +2506,8 @@ textarea.input-sm,
select[multiple].input-sm { select[multiple].input-sm {
height: auto; height: auto;
} }
.input-lg { .input-lg,
.form-horizontal .form-group-lg .form-control {
height: 46px; height: 46px;
padding: 10px 16px; padding: 10px 16px;
font-size: 18px; font-size: 18px;
...@@ -2616,9 +2630,6 @@ select[multiple].input-lg { ...@@ -2616,9 +2630,6 @@ select[multiple].input-lg {
.has-feedback label.sr-only ~ .form-control-feedback { .has-feedback label.sr-only ~ .form-control-feedback {
top: 0; top: 0;
} }
.form-control-static {
margin-bottom: 0;
}
.help-block { .help-block {
display: block; display: block;
margin-top: 5px; margin-top: 5px;
...@@ -2688,10 +2699,6 @@ select[multiple].input-lg { ...@@ -2688,10 +2699,6 @@ select[multiple].input-lg {
margin-right: -15px; margin-right: -15px;
margin-left: -15px; margin-left: -15px;
} }
.form-horizontal .form-control-static {
padding-top: 7px;
padding-bottom: 7px;
}
@media (min-width: 768px) { @media (min-width: 768px) {
.form-horizontal .control-label { .form-horizontal .control-label {
padding-top: 7px; padding-top: 7px;
...@@ -2703,6 +2710,16 @@ select[multiple].input-lg { ...@@ -2703,6 +2710,16 @@ select[multiple].input-lg {
top: 0; top: 0;
right: 15px; right: 15px;
} }
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
padding-top: 14.3px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 6px;
}
}
.btn { .btn {
display: inline-block; display: inline-block;
padding: 6px 12px; padding: 6px 12px;
...@@ -3027,7 +3044,7 @@ fieldset[disabled] .btn-link { ...@@ -3027,7 +3044,7 @@ fieldset[disabled] .btn-link {
fieldset[disabled] .btn-link:hover, fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus, .btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus { fieldset[disabled] .btn-link:focus {
color: #999; color: #777;
text-decoration: none; text-decoration: none;
} }
.btn-lg, .btn-lg,
...@@ -3054,8 +3071,6 @@ fieldset[disabled] .btn-link:focus { ...@@ -3054,8 +3071,6 @@ fieldset[disabled] .btn-link:focus {
.btn-block { .btn-block {
display: block; display: block;
width: 100%; width: 100%;
padding-right: 0;
padding-left: 0;
} }
.btn-block + .btn-block { .btn-block + .btn-block {
margin-top: 5px; margin-top: 5px;
...@@ -3168,7 +3183,7 @@ tbody.collapse.in { ...@@ -3168,7 +3183,7 @@ tbody.collapse.in {
.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus { .dropdown-menu > .disabled > a:focus {
color: #999; color: #777;
} }
.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus { .dropdown-menu > .disabled > a:focus {
...@@ -3197,7 +3212,8 @@ tbody.collapse.in { ...@@ -3197,7 +3212,8 @@ tbody.collapse.in {
padding: 3px 20px; padding: 3px 20px;
font-size: 12px; font-size: 12px;
line-height: 1.42857143; line-height: 1.42857143;
color: #999; color: #777;
white-space: nowrap;
} }
.dropdown-backdrop { .dropdown-backdrop {
position: fixed; position: fixed;
...@@ -3578,11 +3594,11 @@ select[multiple].input-group-sm > .input-group-btn > .btn { ...@@ -3578,11 +3594,11 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
background-color: #eee; background-color: #eee;
} }
.nav > li.disabled > a { .nav > li.disabled > a {
color: #999; color: #777;
} }
.nav > li.disabled > a:hover, .nav > li.disabled > a:hover,
.nav > li.disabled > a:focus { .nav > li.disabled > a:focus {
color: #999; color: #777;
text-decoration: none; text-decoration: none;
cursor: not-allowed; cursor: not-allowed;
background-color: transparent; background-color: transparent;
...@@ -4176,7 +4192,7 @@ fieldset[disabled] .navbar-default .btn-link:focus { ...@@ -4176,7 +4192,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
border-color: #080808; border-color: #080808;
} }
.navbar-inverse .navbar-brand { .navbar-inverse .navbar-brand {
color: #999; color: #777;
} }
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus { .navbar-inverse .navbar-brand:focus {
...@@ -4184,10 +4200,10 @@ fieldset[disabled] .navbar-default .btn-link:focus { ...@@ -4184,10 +4200,10 @@ fieldset[disabled] .navbar-default .btn-link:focus {
background-color: transparent; background-color: transparent;
} }
.navbar-inverse .navbar-text { .navbar-inverse .navbar-text {
color: #999; color: #777;
} }
.navbar-inverse .navbar-nav > li > a { .navbar-inverse .navbar-nav > li > a {
color: #999; color: #777;
} }
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus { .navbar-inverse .navbar-nav > li > a:focus {
...@@ -4234,7 +4250,7 @@ fieldset[disabled] .navbar-default .btn-link:focus { ...@@ -4234,7 +4250,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
background-color: #080808; background-color: #080808;
} }
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a { .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #999; color: #777;
} }
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
...@@ -4255,13 +4271,13 @@ fieldset[disabled] .navbar-default .btn-link:focus { ...@@ -4255,13 +4271,13 @@ fieldset[disabled] .navbar-default .btn-link:focus {
} }
} }
.navbar-inverse .navbar-link { .navbar-inverse .navbar-link {
color: #999; color: #777;
} }
.navbar-inverse .navbar-link:hover { .navbar-inverse .navbar-link:hover {
color: #fff; color: #fff;
} }
.navbar-inverse .btn-link { .navbar-inverse .btn-link {
color: #999; color: #777;
} }
.navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link:focus { .navbar-inverse .btn-link:focus {
...@@ -4289,7 +4305,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus { ...@@ -4289,7 +4305,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
content: "/\00a0"; content: "/\00a0";
} }
.breadcrumb > .active { .breadcrumb > .active {
color: #999; color: #777;
} }
.pagination { .pagination {
display: inline-block; display: inline-block;
...@@ -4349,7 +4365,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus { ...@@ -4349,7 +4365,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination > .disabled > a, .pagination > .disabled > a,
.pagination > .disabled > a:hover, .pagination > .disabled > a:hover,
.pagination > .disabled > a:focus { .pagination > .disabled > a:focus {
color: #999; color: #777;
cursor: not-allowed; cursor: not-allowed;
background-color: #fff; background-color: #fff;
border-color: #ddd; border-color: #ddd;
...@@ -4418,7 +4434,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus { ...@@ -4418,7 +4434,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pager .disabled > a:hover, .pager .disabled > a:hover,
.pager .disabled > a:focus, .pager .disabled > a:focus,
.pager .disabled > span { .pager .disabled > span {
color: #999; color: #777;
cursor: not-allowed; cursor: not-allowed;
background-color: #fff; background-color: #fff;
} }
...@@ -4448,11 +4464,11 @@ a.label:focus { ...@@ -4448,11 +4464,11 @@ a.label:focus {
top: -1px; top: -1px;
} }
.label-default { .label-default {
background-color: #999; background-color: #777;
} }
.label-default[href]:hover, .label-default[href]:hover,
.label-default[href]:focus { .label-default[href]:focus {
background-color: #808080; background-color: #5e5e5e;
} }
.label-primary { .label-primary {
background-color: #428bca; background-color: #428bca;
...@@ -4500,7 +4516,7 @@ a.label:focus { ...@@ -4500,7 +4516,7 @@ a.label:focus {
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
background-color: #999; background-color: #777;
border-radius: 10px; border-radius: 10px;
} }
.badge:empty { .badge:empty {
...@@ -4612,10 +4628,12 @@ a.thumbnail.active { ...@@ -4612,10 +4628,12 @@ a.thumbnail.active {
.alert > p + p { .alert > p + p {
margin-top: 5px; margin-top: 5px;
} }
.alert-dismissable { .alert-dismissable,
.alert-dismissible {
padding-right: 35px; padding-right: 35px;
} }
.alert-dismissable .close { .alert-dismissable .close,
.alert-dismissible .close {
position: relative; position: relative;
top: -2px; top: -2px;
right: -21px; right: -21px;
...@@ -4713,14 +4731,16 @@ a.thumbnail.active { ...@@ -4713,14 +4731,16 @@ a.thumbnail.active {
-o-transition: width .6s ease; -o-transition: width .6s ease;
transition: width .6s ease; transition: width .6s ease;
} }
.progress-striped .progress-bar { .progress-striped .progress-bar,
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 40px 40px; -webkit-background-size: 40px 40px;
background-size: 40px 40px; background-size: 40px 40px;
} }
.progress.active .progress-bar { .progress.active .progress-bar,
.progress-bar.active {
-webkit-animation: progress-bar-stripes 2s linear infinite; -webkit-animation: progress-bar-stripes 2s linear infinite;
-o-animation: progress-bar-stripes 2s linear infinite; -o-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite;
...@@ -4731,7 +4751,7 @@ a.thumbnail.active { ...@@ -4731,7 +4751,7 @@ a.thumbnail.active {
} }
.progress-bar[aria-valuenow="0"] { .progress-bar[aria-valuenow="0"] {
min-width: 30px; min-width: 30px;
color: #999; color: #777;
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
-webkit-box-shadow: none; -webkit-box-shadow: none;
...@@ -4839,7 +4859,7 @@ a.list-group-item:focus { ...@@ -4839,7 +4859,7 @@ a.list-group-item:focus {
.list-group-item.disabled, .list-group-item.disabled,
.list-group-item.disabled:hover, .list-group-item.disabled:hover,
.list-group-item.disabled:focus { .list-group-item.disabled:focus {
color: #999; color: #777;
background-color: #eee; background-color: #eee;
} }
.list-group-item.disabled .list-group-item-heading, .list-group-item.disabled .list-group-item-heading,
...@@ -4850,7 +4870,7 @@ a.list-group-item:focus { ...@@ -4850,7 +4870,7 @@ a.list-group-item:focus {
.list-group-item.disabled .list-group-item-text, .list-group-item.disabled .list-group-item-text,
.list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text,
.list-group-item.disabled:focus .list-group-item-text { .list-group-item.disabled:focus .list-group-item-text {
color: #999; color: #777;
} }
.list-group-item.active, .list-group-item.active,
.list-group-item.active:hover, .list-group-item.active:hover,
...@@ -4862,7 +4882,13 @@ a.list-group-item:focus { ...@@ -4862,7 +4882,13 @@ a.list-group-item:focus {
} }
.list-group-item.active .list-group-item-heading, .list-group-item.active .list-group-item-heading,
.list-group-item.active:hover .list-group-item-heading, .list-group-item.active:hover .list-group-item-heading,
.list-group-item.active:focus .list-group-item-heading { .list-group-item.active:focus .list-group-item-heading,
.list-group-item.active .list-group-item-heading > small,
.list-group-item.active:hover .list-group-item-heading > small,
.list-group-item.active:focus .list-group-item-heading > small,
.list-group-item.active .list-group-item-heading > .small,
.list-group-item.active:hover .list-group-item-heading > .small,
.list-group-item.active:focus .list-group-item-heading > .small {
color: inherit; color: inherit;
} }
.list-group-item.active .list-group-item-text, .list-group-item.active .list-group-item-text,
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
- name: Little - name: Red Antler
url: http://littleco.com url: http://www.redantler.com/
expo_url: http://expo.getbootstrap.com/2014/02/12/little/ expo_url: http://expo.getbootstrap.com/2014/02/24/redantler/
img: http://expo.getbootstrap.com/screenshots/little.jpg img: redantler
- name: Engine Yard - name: Riot Design
url: http://engineyard.com url: http://riotdesign.eu/en/
expo_url: http://expo.getbootstrap.com/2014/02/10/engine-yard/ expo_url: http://expo.getbootstrap.com/2014/03/13/riot-design/
img: http://expo.getbootstrap.com/screenshots/engine-yard.jpg img: riot
- name: Webflow - name: Newsweek
url: http://webflow.com url: http://www.newsweek.com/
expo_url: http://expo.getbootstrap.com/2014/02/04/webflow/ expo_url: http://expo.getbootstrap.com/2014/02/12/newsweek/
img: http://expo.getbootstrap.com/screenshots/webflow.jpg img: newsweek
- name: Sentry - name: Robinhood
url: https://getsentry.com url: https://www.robinhood.com
expo_url: http://expo.getbootstrap.com/2013/05/09/sentry/ expo_url: http://expo.getbootstrap.com/2014/02/26/robinhood/
img: http://expo.getbootstrap.com/screenshots/sentry.jpg img: robinhood
...@@ -32,16 +32,16 @@ ...@@ -32,16 +32,16 @@
<div class="alert alert-danger" role="alert">...</div> <div class="alert alert-danger" role="alert">...</div>
{% endhighlight %} {% endhighlight %}
<h2 id="alerts-dismissable">Dismissable alerts</h2> <h2 id="alerts-dismissible">Dismissible alerts</h2>
<p>Build on any alert by adding an optional <code>.alert-dismissable</code> and close button.</p> <p>Build on any alert by adding an optional <code>.alert-dismissible</code> and close button.</p>
<div class="bs-example"> <div class="bs-example">
<div class="alert alert-warning alert-dismissable" role="alert"> <div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Warning!</strong> Better check yourself, you're not looking too good. <strong>Warning!</strong> Better check yourself, you're not looking too good.
</div> </div>
</div> </div>
{% highlight html %} {% highlight html %}
<div class="alert alert-warning alert-dismissable" role="alert"> <div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Warning!</strong> Better check yourself, you're not looking too good. <strong>Warning!</strong> Better check yourself, you're not looking too good.
</div> </div>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<h3 id="panels-heading">Panel with heading</h3> <h3 id="panels-heading">Panel with heading</h3>
<p>Easily add a heading container to your panel with <code>.panel-heading</code>. You may also include any <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code> with a <code>.panel-title</code> class to add a pre-styled heading.</p> <p>Easily add a heading container to your panel with <code>.panel-heading</code>. You may also include any <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code> with a <code>.panel-title</code> class to add a pre-styled heading.</p>
<p>For proper link coloring, be sure to place links in headings within <code>.panel-title</code>.</p>
<div class="bs-example"> <div class="bs-example">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Panel heading without title</div> <div class="panel-heading">Panel heading without title</div>
......
...@@ -120,60 +120,60 @@ ...@@ -120,60 +120,60 @@
<h3 id="progress-striped">Striped</h3> <h3 id="progress-striped">Striped</h3>
<p>Uses a gradient to create a striped effect. Not available in IE8.</p> <p>Uses a gradient to create a striped effect. Not available in IE8.</p>
<div class="bs-example"> <div class="bs-example">
<div class="progress progress-striped" > <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"> <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete (success)</span> <span class="sr-only">40% Complete (success)</span>
</div> </div>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"> <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span class="sr-only">20% Complete</span> <span class="sr-only">20% Complete</span>
</div> </div>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"> <div class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span> <span class="sr-only">60% Complete (warning)</span>
</div> </div>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"> <div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
<span class="sr-only">80% Complete (danger)</span> <span class="sr-only">80% Complete (danger)</span>
</div> </div>
</div> </div>
</div> </div>
{% highlight html %} {% highlight html %}
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"> <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete (success)</span> <span class="sr-only">40% Complete (success)</span>
</div> </div>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"> <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span class="sr-only">20% Complete</span> <span class="sr-only">20% Complete</span>
</div> </div>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"> <div class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span> <span class="sr-only">60% Complete (warning)</span>
</div> </div>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"> <div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
<span class="sr-only">80% Complete (danger)</span> <span class="sr-only">80% Complete (danger)</span>
</div> </div>
</div> </div>
{% endhighlight %} {% endhighlight %}
<h3 id="progress-animated">Animated</h3> <h3 id="progress-animated">Animated</h3>
<p>Add <code>.active</code> to <code>.progress-striped</code> to animate the stripes right to left. Not available in IE9 and below.</p> <p>Add <code>.active</code> to <code>.progress-bar-striped</code> to animate the stripes right to left. Not available in IE9 and below.</p>
<div class="bs-example"> <div class="bs-example">
<div class="progress progress-striped active"> <div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"><span class="sr-only">45% Complete</span></div> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"><span class="sr-only">45% Complete</span></div>
</div> </div>
</div> </div>
{% highlight html %} {% highlight html %}
<div class="progress progress-striped active"> <div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
<span class="sr-only">45% Complete</span> <span class="sr-only">45% Complete</span>
</div> </div>
</div> </div>
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<div class="progress-bar progress-bar-success" style="width: 35%"> <div class="progress-bar progress-bar-success" style="width: 35%">
<span class="sr-only">35% Complete (success)</span> <span class="sr-only">35% Complete (success)</span>
</div> </div>
<div class="progress-bar progress-bar-warning" style="width: 20%"> <div class="progress-bar progress-bar-warning progress-bar-striped" style="width: 20%">
<span class="sr-only">20% Complete (warning)</span> <span class="sr-only">20% Complete (warning)</span>
</div> </div>
<div class="progress-bar progress-bar-danger" style="width: 10%"> <div class="progress-bar progress-bar-danger" style="width: 10%">
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
<div class="progress-bar progress-bar-success" style="width: 35%"> <div class="progress-bar progress-bar-success" style="width: 35%">
<span class="sr-only">35% Complete (success)</span> <span class="sr-only">35% Complete (success)</span>
</div> </div>
<div class="progress-bar progress-bar-warning" style="width: 20%"> <div class="progress-bar progress-bar-warning progress-bar-striped" style="width: 20%">
<span class="sr-only">20% Complete (warning)</span> <span class="sr-only">20% Complete (warning)</span>
</div> </div>
<div class="progress-bar progress-bar-danger" style="width: 10%"> <div class="progress-bar progress-bar-danger" style="width: 10%">
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<h2 id="buttons-active">Active state</h2> <h2 id="buttons-active">Active state</h2>
<p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code>&lt;button&gt;</code> elements, this is done via <code>:active</code>. For <code>&lt;a&gt;</code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> on <code>&lt;button&gt;</code>s should you need to replicate the active state progammatically.</p> <p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code>&lt;button&gt;</code> elements, this is done via <code>:active</code>. For <code>&lt;a&gt;</code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> on <code>&lt;button&gt;</code>s should you need to replicate the active state programmatically.</p>
<h3>Button element</h3> <h3>Button element</h3>
<p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p> <p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p>
......
...@@ -670,6 +670,42 @@ ...@@ -670,6 +670,42 @@
<select class="form-control input-sm">...</select> <select class="form-control input-sm">...</select>
{% endhighlight %} {% endhighlight %}
<h3>Horizontal form group sizes</h3>
<p>Quickly size labels and form controls within <code>.form-horizontal</code> by adding <code>.form-group-lg</code> or <code>.form-group-sm</code>.</p>
<div class="bs-example">
<form class="form-horizontal" role="form">
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="formGroupInputLarge">Large label</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="formGroupInputLarge" placeholder="Large input">
</div>
</div>
<div class="form-group form-group-sm">
<label class="col-sm-2 control-label" for="formGroupInputSmall">Small label</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="formGroupInputSmall" placeholder="Small input">
</div>
</div>
</form>
</div><!-- /.bs-example -->
{% highlight html %}
<form class="form-horizontal" role="form">
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="formGroupInputLarge">Large label</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="formGroupInputLarge" placeholder="Large input">
</div>
</div>
<div class="form-group form-group-sm">
<label class="col-sm-2 control-label" for="formGroupInputSmall">Small label</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="formGroupInputSmall" placeholder="Small input">
</div>
</div>
</form>
{% endhighlight %}
<h3>Column sizing</h3> <h3>Column sizing</h3>
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p> <p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
<div class="bs-example"> <div class="bs-example">
......
...@@ -347,16 +347,16 @@ ...@@ -347,16 +347,16 @@
<h3 id="grid-nesting">Nesting columns</h3> <h3 id="grid-nesting">Nesting columns</h3>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-md-*</code> columns within an existing <code>.col-md-*</code> column. Nested rows should include a set of columns that add up to 12 or less (it is not required that you use all 12 available columns).</p> <p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-sm-*</code> columns within an existing <code>.col-sm-*</code> column. Nested rows should include a set of columns that add up to 12 or less (it is not required that you use all 12 available columns).</p>
<div class="row show-grid"> <div class="row show-grid">
<div class="col-sm-9"> <div class="col-sm-9">
Level 1: .col-md-9 Level 1: .col-sm-9
<div class="row show-grid"> <div class="row show-grid">
<div class="col-xs-8 col-sm-6"> <div class="col-xs-8 col-sm-6">
Level 2: .col-xs-8 .col-md-6 Level 2: .col-xs-8 .col-sm-6
</div> </div>
<div class="col-xs-4 col-sm-6"> <div class="col-xs-4 col-sm-6">
Level 2: .col-xs-4 .col-md-6 Level 2: .col-xs-4 .col-sm-6
</div> </div>
</div> </div>
</div> </div>
...@@ -364,13 +364,13 @@ ...@@ -364,13 +364,13 @@
{% highlight html %} {% highlight html %}
<div class="row"> <div class="row">
<div class="col-sm-9"> <div class="col-sm-9">
Level 1: .col-md-9 Level 1: .col-sm-9
<div class="row"> <div class="row">
<div class="col-xs-8 col-sm-6"> <div class="col-xs-8 col-sm-6">
Level 2: .col-xs-8 .col-md-6 Level 2: .col-xs-8 .col-sm-6
</div> </div>
<div class="col-xs-4 col-sm-6"> <div class="col-xs-4 col-sm-6">
Level 2: .col-xs-4 .col-md-6 Level 2: .col-xs-4 .col-sm-6
</div> </div>
</div> </div>
</div> </div>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@gray-darker: lighten(#000, 13.5%); // #222 @gray-darker: lighten(#000, 13.5%); // #222
@gray-dark: lighten(#000, 20%); // #333 @gray-dark: lighten(#000, 20%); // #333
@gray: lighten(#000, 33.5%); // #555 @gray: lighten(#000, 33.5%); // #555
@gray-light: lighten(#000, 60%); // #999 @gray-light: lighten(#000, 46.7%); // #777
@gray-lighter: lighten(#000, 93.5%); // #eee @gray-lighter: lighten(#000, 93.5%); // #eee
{% endhighlight %} {% endhighlight %}
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="bs-customizer-input"> <div class="bs-customizer-input">
<label for="input-@gray-light">@gray-light</label> <label for="input-@gray-light">@gray-light</label>
<input id="input-@gray-light" type="text" value="lighten(#000, 60%)" data-var="@gray-light" class="form-control"/> <input id="input-@gray-light" type="text" value="lighten(#000, 46.7%)" data-var="@gray-light" class="form-control"/>
</div> </div>
<div class="bs-customizer-input"> <div class="bs-customizer-input">
<label for="input-@gray-lighter">@gray-lighter</label> <label for="input-@gray-lighter">@gray-lighter</label>
...@@ -1735,6 +1735,11 @@ ...@@ -1735,6 +1735,11 @@
<input id="input-@page-header-border-color" type="text" value="@gray-lighter" data-var="@page-header-border-color" class="form-control"/> <input id="input-@page-header-border-color" type="text" value="@gray-lighter" data-var="@page-header-border-color" class="form-control"/>
<p class="help-block">Page header border color</p> <p class="help-block">Page header border color</p>
</div> </div>
<div class="bs-customizer-input">
<label for="input-@dl-horizontal-offset">@dl-horizontal-offset</label>
<input id="input-@dl-horizontal-offset" type="text" value="@component-offset-horizontal" data-var="@dl-horizontal-offset" class="form-control"/>
<p class="help-block">Width of horizontal description list titles</p>
</div>
</div> </div>
<h2 id="miscellaneous">Miscellaneous</h2> <h2 id="miscellaneous">Miscellaneous</h2>
<p></p> <p></p>
......
...@@ -106,6 +106,9 @@ ...@@ -106,6 +106,9 @@
<h3 id="support-ie8-box-sizing">Internet Explorer 8 and box-sizing</h3> <h3 id="support-ie8-box-sizing">Internet Explorer 8 and box-sizing</h3>
<p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p> <p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p>
<h3 id="support-ie8-font-face">Internet Explorer 8 and @font-face</h3>
<p>IE8 has some issues with <code>@font-face</code> when combined with <code>:before</code>. Bootstrap uses that combination with its Glyphicons. If a page is cached, and loaded without the mouse over the window (i.e. hit the refresh button or load something in an iframe) then the page gets rendered before the font loads. Hovering over the page (body) will show some of the icons and hovering over the remaining icons will show those as well. <a href="https://github.com/twbs/bootstrap/issues/13863">See issue #13863</a> for details.</p>
<h3 id="support-ie-compatibility-modes">IE Compatibility modes</h3> <h3 id="support-ie-compatibility-modes">IE Compatibility modes</h3>
<p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code>&lt;meta&gt;</code> tag in your pages:</p> <p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code>&lt;meta&gt;</code> tag in your pages:</p>
{% highlight html %} {% highlight html %}
......
<div class="bs-docs-section"> <div class="bs-docs-section">
<h1 id="examples" class="page-header">Examples</h1> <h1 id="examples" class="page-header">Examples</h1>
<p class="lead">Build on the basic template above with Bootstrap's many components. See also <a href="#customizing">Customizing Bootstrap</a> for tips on maintaining your own Bootstrap variants.</p> <p class="lead">Build on the basic template above with Bootstrap's many components. We encourage you to customize and adapt Bootstrap to suit your individual project's needs.</p>
<h3 id="examples-framework">Using the framework</h3> <h3 id="examples-framework">Using the framework</h3>
<div class="row bs-examples"> <div class="row bs-examples">
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<img src="../examples/screenshots/justified-nav.jpg" alt=""> <img src="../examples/screenshots/justified-nav.jpg" alt="">
</a> </a>
<h4>Justified nav</h4> <h4>Justified nav</h4>
<p>Create a custom navbar with justified links. Heads up! <a href="../components/#nav-justified">Not too WebKit friendly.</a></p> <p>Create a custom navbar with justified links. Heads up! <a href="../components/#nav-justified">Not too Safari friendly.</a></p>
</div> </div>
<div class="clearfix visible-xs"></div> <div class="clearfix visible-xs"></div>
...@@ -155,12 +155,5 @@ ...@@ -155,12 +155,5 @@
<h4>Offcanvas</h4> <h4>Offcanvas</h4>
<p>Build a toggleable off-canvas navigation menu for use with Bootstrap.</p> <p>Build a toggleable off-canvas navigation menu for use with Bootstrap.</p>
</div> </div>
<div class="col-xs-6 col-md-4">
<a class="thumbnail" href="../examples/equal-height-columns/">
<img src="../examples/screenshots/equal-height-columns.jpg" alt="">
</a>
<h4>Equal-height grid columns</h4>
<p>Adds automatic equal-height grid columns to Bootstrap's grid system.</p>
</div>
</div> </div>
</div> </div>
...@@ -144,7 +144,7 @@ $('.btn').button() ...@@ -144,7 +144,7 @@ $('.btn').button()
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Cross-browser compatibility</h4> <h4>Cross-browser compatibility</h4>
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists the disabled state across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p> <p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
</div> </div>
<h4>$().button('reset')</h4> <h4>$().button('reset')</h4>
......
...@@ -111,10 +111,10 @@ sagittis lacus vel augue laoreet rutrum faucibus."> ...@@ -111,10 +111,10 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
<h4>Dismiss on next click</h4> <h4>Dismiss on next click</h4>
<p>Use the <code>focus</code> trigger to dismiss popovers on their next click.</p> <p>Use the <code>focus</code> trigger to dismiss popovers on their next click.</p>
<div class="bs-example" style="padding-bottom: 24px;"> <div class="bs-example" style="padding-bottom: 24px;">
<button type="button" class="btn btn-lg btn-danger bs-docs-popover-dismiss" data-toggle="popover" title="Dimissmisable popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissable popover</button> <button type="button" class="btn btn-lg btn-danger bs-docs-popover-dismiss" data-toggle="popover" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</button>
</div> </div>
{% highlight html %} {% highlight html %}
<button type="button" class="btn btn-lg btn-danger popover-dismiss" data-toggle="popover" title="Dimissmisable popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissable popover</button> <button type="button" class="btn btn-lg btn-danger popover-dismiss" data-toggle="popover" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</button>
{% endhighlight %} {% endhighlight %}
{% highlight js %} {% highlight js %}
$('.popover-dismiss').popover({ $('.popover-dismiss').popover({
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<a href="#alerts">Alerts</a> <a href="#alerts">Alerts</a>
<ul class="nav"> <ul class="nav">
<li><a href="#alerts-examples">Examples</a></li> <li><a href="#alerts-examples">Examples</a></li>
<li><a href="#alerts-dismissable">Dismissable alerts</a></li> <li><a href="#alerts-dismissible">Dismissible alerts</a></li>
<li><a href="#alerts-links">Links in alerts</a></li> <li><a href="#alerts-links">Links in alerts</a></li>
</ul> </ul>
</li> </li>
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<li><a href="#support-ie8-ie9">Internet Explorer 8-9</a></li> <li><a href="#support-ie8-ie9">Internet Explorer 8-9</a></li>
<li><a href="#support-ie8-respondjs">IE8 and Respond.js</a></li> <li><a href="#support-ie8-respondjs">IE8 and Respond.js</a></li>
<li><a href="#support-ie8-box-sizing">IE8 and box-sizing</a></li> <li><a href="#support-ie8-box-sizing">IE8 and box-sizing</a></li>
<li><a href="#support-ie8-font-face">IE8 and @font-face</a></li>
<li><a href="#support-ie-compatibility-modes">IE Compatibility modes</a></li> <li><a href="#support-ie-compatibility-modes">IE Compatibility modes</a></li>
<li><a href="#support-ie10-width">IE10 and Windows (Phone) 8</a></li> <li><a href="#support-ie10-width">IE10 and Windows (Phone) 8</a></li>
<li><a href="#support-safari-percentages">Safari percent rounding</a></li> <li><a href="#support-safari-percentages">Safari percent rounding</a></li>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
{{ content }} {{ content }}
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="bs-docs-sidebar hidden-print" role="complementary"> <div class="bs-docs-sidebar hidden-print hidden-xs hidden-sm" role="complementary">
<ul class="nav bs-docs-sidenav"> <ul class="nav bs-docs-sidenav">
{% if page.slug == "getting-started" %} {% if page.slug == "getting-started" %}
{% include nav/getting-started.html %} {% include nav/getting-started.html %}
......
...@@ -857,7 +857,7 @@ h1[id] { ...@@ -857,7 +857,7 @@ h1[id] {
left: 15px; left: 15px;
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
color: #bbb; color: #959595;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
content: "Example"; content: "Example";
......
This diff is collapsed.
...@@ -233,7 +233,7 @@ window.onload = function () { // wait for load in a dumb way because B-0 ...@@ -233,7 +233,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
if (('variables.less' === filename) && vars) lessSource += generateCustomLess(vars) if (('variables.less' === filename) && vars) lessSource += generateCustomLess(vars)
}) })
lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports lessSource = lessSource.replace(/@import[^\n]*/gi, '') // strip any imports
return lessSource return lessSource
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/*
* Row with equal height columns
* --------------------------------------------------
*/
.row-eq-height {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
/*
* Styles copied from the Grid example to make grid rows & columns visible.
*/
.container {
padding-right: 15px;
padding-left: 15px;
}
h4 {
margin-top: 25px;
}
.row {
margin-bottom: 20px;
}
.row .row {
margin-top: 10px;
margin-bottom: 0;
}
[class*="col-"] {
padding-top: 15px;
padding-bottom: 15px;
background-color: #eee;
background-color: rgba(86,61,124,.15);
border: 1px solid #ddd;
border: 1px solid rgba(86,61,124,.2);
}
/*
* Callout styles copied from Bootstrap's main docs.
*/
/* Common styles for all types */
.bs-callout {
padding: 20px;
margin: 20px 0;
border-left: 3px solid #eee;
}
.bs-callout h4 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout code {
background-color: #fff;
border-radius: 3px;
}
/* Variations */
.bs-callout-danger {
background-color: #fdf7f7;
border-color: #d9534f;
}
.bs-callout-danger h4 {
color: #d9534f;
}
.bs-callout-warning {
background-color: #fcf8f2;
border-color: #f0ad4e;
}
.bs-callout-warning h4 {
color: #f0ad4e;
}
.bs-callout-info {
background-color: #f4f8fa;
border-color: #5bc0de;
}
.bs-callout-info h4 {
color: #5bc0de;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Equal Height Columns Example for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="equal-height-columns.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="../../assets/js/ie-emulation-modes-warning.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Bootstrap equal-height columns experiment</h1>
<p class="lead">A simple experiment that adds flexbox-based equal-height columns to Bootstrap's grid system.</p>
</div>
<h3>Normal row (with unequal-height columns)</h3>
<p>For comparison, here's a normal row, <strong>without</strong> <code>.row-eq-height</code>.</p>
<div class="row">
<div class="col-xs-4">.row &gt; .col-xs-4</div>
<div class="col-xs-4">.row &gt; .col-xs-4<br>this is<br>a much<br>taller<br>column<br>than the others</div>
<div class="col-xs-4">.row &gt; .col-xs-4</div>
</div>
<h3>Row with equal-height columns</h3>
<p>This row uses the custom <code>.row-eq-height</code> class defined in <a href="equal-height-columns.css">this example's CSS</a> to make all of its columns automatically be of equal height.</p>
<p>All of the columns will stretch vertically to occupy the same height as the tallest column.</p>
<div class="row row-eq-height">
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4</div>
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4<br>this is<br>a much<br>taller<br>column<br>than the others</div>
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4</div>
</div>
<div class="bs-callout bs-callout-danger">
<h4>Warning: Browser compatibility</h4>
<p>The <code>.row-eq-height</code> class uses <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes">CSS3's flexbox layout mode</a>, which is not supported in Internet Explorer 9 and below.</p>
<p>In any unsupported browser, the <code>.row-eq-height</code> class will have no effect.</p>
<p>For more info on browser support for flexbox, please consult <a href="http://caniuse.com/flexbox">"Can I use..."</a>.</p>
</div>
<div class="bs-callout bs-callout-warning">
<h4>Warning: Changes column wrapping behavior</h4>
<p>If you have put more than 12 columns in one <code>.row-eq-height</code>, the columns will be forced to shrink into a single row, instead of wrapping onto a new line as they normally would.</p>
</div>
<h3>Equal-height row with more than 12 columns</h3>
<div class="row row-eq-height">
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4</div>
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4</div>
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4</div>
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4<br>This and subsequent columns would normally have wrapped onto a new line,<br>if not for <code>.row-eq-height</code>.</div>
<div class="col-xs-4">.row.row-eq-height &gt; .col-xs-4<br></div>
</div>
</div> <!-- /container -->
</body>
</html>
...@@ -485,6 +485,9 @@ ...@@ -485,6 +485,9 @@
<div class="progress"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"><span class="sr-only">80% Complete (danger)</span></div> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"><span class="sr-only">80% Complete (danger)</span></div>
</div> </div>
<div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"><span class="sr-only">100% Complete</span></div>
</div>
<div class="progress"> <div class="progress">
<div class="progress-bar progress-bar-success" style="width: 35%"><span class="sr-only">35% Complete (success)</span></div> <div class="progress-bar progress-bar-success" style="width: 35%"><span class="sr-only">35% Complete (success)</span></div>
<div class="progress-bar progress-bar-warning" style="width: 20%"><span class="sr-only">20% Complete (warning)</span></div> <div class="progress-bar progress-bar-warning" style="width: 20%"><span class="sr-only">20% Complete (warning)</span></div>
......
...@@ -58,7 +58,7 @@ title: Bootstrap ...@@ -58,7 +58,7 @@ title: Bootstrap
{% for showcase in site.data.showcase %} {% for showcase in site.data.showcase %}
<div class="col-sm-3"> <div class="col-sm-3">
<a href="{{ showcase.expo_url }}" target="_blank" title="{{ showcase.name }}"> <a href="{{ showcase.expo_url }}" target="_blank" title="{{ showcase.name }}">
<img src="{{ showcase.img }}" alt="{{ showcase.name }}" class="img-responsive"> <img src="http://expo.getbootstrap.com/screenshots/{{ showcase.img }}.jpg" alt="{{ showcase.name }}" class="img-responsive">
</a> </a>
</div> </div>
{% endfor %} {% endfor %}
......
/*!
* Bootstrap Grunt task for generating npm-shrinkwrap.canonical.json
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*
This Grunt task updates the npm-shrinkwrap.canonical.json file that's used as the key for Bootstrap's npm packages cache.
This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
*/
'use strict';
var canonicallyJsonStringify = require('canonical-json');
var NON_CANONICAL_FILE = 'npm-shrinkwrap.json';
var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json';
function cleanup(shrinkwrap) {
// Remove `resolved` property to avoid irrelevant changes
// See https://github.com/npm/npm/issues/3581
if (typeof shrinkwrap === 'string') {
return shrinkwrap;
}
delete shrinkwrap.resolved;
for (var key in shrinkwrap) {
shrinkwrap[key] = cleanup(shrinkwrap[key]);
}
return shrinkwrap;
}
function updateShrinkwrap(grunt) {
// Assumption: Non-canonical shrinkwrap already generated by prerequisite Grunt task
var shrinkwrapData = grunt.file.readJSON(NON_CANONICAL_FILE);
grunt.log.writeln('Deleting ' + NON_CANONICAL_FILE.cyan + '...');
grunt.file.delete(NON_CANONICAL_FILE);
// Output as Canonical JSON in correct location
grunt.file.write(DEST_FILE, canonicallyJsonStringify(cleanup(shrinkwrapData)));
grunt.log.writeln('File ' + DEST_FILE.cyan + ' updated.');
}
module.exports = updateShrinkwrap;
{ {
"disallowEmptyBlocks": true, "disallowEmptyBlocks": true,
"disallowKeywords": ["with"], "disallowKeywords": ["with"],
"disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true, "disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true, "disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true, "disallowMultipleVarDecl": true,
"disallowQuotedKeysInObjects": "allButReserved", "disallowQuotedKeysInObjects": "allButReserved",
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], "disallowSpaceAfterPrefixUnaryOperators": ["!"],
"disallowSpaceBeforeBinaryOperators": [","],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true, "disallowSpacesInsideArrayBrackets": true,
"disallowTrailingComma": true,
"disallowSpacesInsideParentheses": true, "disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true, "disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true, "requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true, "requireCommaBeforeLineBreak": true,
"requireDotNotation": true, "requireDotNotation": true,
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true, "requireLineFeedAtFileEnd": true,
"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true }, "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
"requireSpacesInConditionalExpression": true,
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
......
...@@ -11,6 +11,5 @@ ...@@ -11,6 +11,5 @@
"nonbsp" : true, "nonbsp" : true,
"strict" : true, "strict" : true,
"undef" : true, "undef" : true,
"unused" : true, "unused" : true
"predef" : [ "define", "require" ]
} }
...@@ -7,142 +7,136 @@ ...@@ -7,142 +7,136 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // AFFIX CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ======================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// AFFIX CLASS DEFINITION var Affix = function (element, options) {
// ====================== this.options = $.extend({}, Affix.DEFAULTS, options)
var Affix = function (element, options) { this.$target = $(this.options.target)
this.options = $.extend({}, Affix.DEFAULTS, options) .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$target = $(this.options.target) this.$element = $(element)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) this.affixed =
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) this.unpin =
this.pinnedOffset = null
this.$element = $(element) this.checkPosition()
this.affixed = }
this.unpin =
this.pinnedOffset = null
this.checkPosition() Affix.VERSION = '3.1.1'
}
Affix.VERSION = '3.1.1'
Affix.RESET = 'affix affix-top affix-bottom' Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = { Affix.DEFAULTS = {
offset: 0, offset: 0,
target: window target: window
} }
Affix.prototype.getPinnedOffset = function () { Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix') this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$target.scrollTop() var scrollTop = this.$target.scrollTop()
var position = this.$element.offset() var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop) return (this.pinnedOffset = position.top - scrollTop)
} }
Affix.prototype.checkPositionWithEventLoop = function () { Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1) setTimeout($.proxy(this.checkPosition, this), 1)
} }
Affix.prototype.checkPosition = function () { Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height() var scrollHeight = $(document).height()
var scrollTop = this.$target.scrollTop() var scrollTop = this.$target.scrollTop()
var position = this.$element.offset() var position = this.$element.offset()
var offset = this.options.offset var offset = this.options.offset
var offsetTop = offset.top var offsetTop = offset.top
var offsetBottom = offset.bottom var offsetBottom = offset.bottom
if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
if (this.affixed === affix) return if (this.affixed === affix) return
if (this.unpin != null) this.$element.css('top', '') if (this.unpin != null) this.$element.css('top', '')
var affixType = 'affix' + (affix ? '-' + affix : '') var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix') var e = $.Event(affixType + '.bs.affix')
this.$element.trigger(e) this.$element.trigger(e)
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
this.affixed = affix this.affixed = affix
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
this.$element this.$element
.removeClass(Affix.RESET) .removeClass(Affix.RESET)
.addClass(affixType) .addClass(affixType)
.trigger($.Event(affixType.replace('affix', 'affixed'))) .trigger($.Event(affixType.replace('affix', 'affixed')))
if (affix == 'bottom') { if (affix == 'bottom') {
this.$element.offset({ this.$element.offset({
top: scrollHeight - this.$element.height() - offsetBottom top: scrollHeight - this.$element.height() - offsetBottom
}) })
}
} }
}
// AFFIX PLUGIN DEFINITION // AFFIX PLUGIN DEFINITION
// ======================= // =======================
function Plugin(option) { function Plugin(option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.affix') var data = $this.data('bs.affix')
var options = typeof option == 'object' && option var options = typeof option == 'object' && option
if (!data) $this.data('bs.affix', (data = new Affix(this, options))) if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
}) })
} }
var old = $.fn.affix var old = $.fn.affix
$.fn.affix = Plugin $.fn.affix = Plugin
$.fn.affix.Constructor = Affix $.fn.affix.Constructor = Affix
// AFFIX NO CONFLICT // AFFIX NO CONFLICT
// ================= // =================
$.fn.affix.noConflict = function () { $.fn.affix.noConflict = function () {
$.fn.affix = old $.fn.affix = old
return this return this
} }
// AFFIX DATA-API // AFFIX DATA-API
// ============== // ==============
$(window).on('load', function () { $(window).on('load', function () {
$('[data-spy="affix"]').each(function () { $('[data-spy="affix"]').each(function () {
var $spy = $(this) var $spy = $(this)
var data = $spy.data() var data = $spy.data()
data.offset = data.offset || {} data.offset = data.offset || {}
if (data.offsetBottom) data.offset.bottom = data.offsetBottom if (data.offsetBottom) data.offset.bottom = data.offsetBottom
if (data.offsetTop) data.offset.top = data.offsetTop if (data.offsetTop) data.offset.top = data.offsetTop
Plugin.call($spy, data) Plugin.call($spy, data)
})
}) })
}) })
}(); }(jQuery);
...@@ -7,92 +7,86 @@ ...@@ -7,92 +7,86 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // ALERT CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ======================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// ALERT CLASS DEFINITION var dismiss = '[data-dismiss="alert"]'
// ====================== var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
var dismiss = '[data-dismiss="alert"]' Alert.VERSION = '3.1.1'
var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.1.1'
Alert.prototype.close = function (e) { Alert.prototype.close = function (e) {
var $this = $(this) var $this = $(this)
var selector = $this.attr('data-target') var selector = $this.attr('data-target')
if (!selector) { if (!selector) {
selector = $this.attr('href') selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }
var $parent = $(selector)
if (e) e.preventDefault() var $parent = $(selector)
if (!$parent.length) { if (e) e.preventDefault()
$parent = $this.hasClass('alert') ? $this : $this.parent()
}
$parent.trigger(e = $.Event('close.bs.alert')) if (!$parent.length) {
$parent = $this.hasClass('alert') ? $this : $this.parent()
}
if (e.isDefaultPrevented()) return $parent.trigger(e = $.Event('close.bs.alert'))
$parent.removeClass('in') if (e.isDefaultPrevented()) return
function removeElement() { $parent.removeClass('in')
// detach from parent, fire event then clean up data
$parent.detach().trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ? function removeElement() {
$parent // detach from parent, fire event then clean up data
.one('bsTransitionEnd', removeElement) $parent.detach().trigger('closed.bs.alert').remove()
.emulateTransitionEnd(150) :
removeElement()
} }
$.support.transition && $parent.hasClass('fade') ?
$parent
.one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(150) :
removeElement()
}
// ALERT PLUGIN DEFINITION
// =======================
function Plugin(option) { // ALERT PLUGIN DEFINITION
return this.each(function () { // =======================
var $this = $(this)
var data = $this.data('bs.alert')
if (!data) $this.data('bs.alert', (data = new Alert(this))) function Plugin(option) {
if (typeof option == 'string') data[option].call($this) return this.each(function () {
}) var $this = $(this)
} var data = $this.data('bs.alert')
var old = $.fn.alert if (!data) $this.data('bs.alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.alert = Plugin var old = $.fn.alert
$.fn.alert.Constructor = Alert
$.fn.alert = Plugin
$.fn.alert.Constructor = Alert
// ALERT NO CONFLICT
// =================
$.fn.alert.noConflict = function () { // ALERT NO CONFLICT
$.fn.alert = old // =================
return this
}
$.fn.alert.noConflict = function () {
$.fn.alert = old
return this
}
// ALERT DATA-API
// ==============
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) // ALERT DATA-API
// ==============
}) $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(); }(jQuery);
...@@ -7,110 +7,104 @@ ...@@ -7,110 +7,104 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // BUTTON PUBLIC CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ==============================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// BUTTON PUBLIC CLASS DEFINITION var Button = function (element, options) {
// ============================== this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.isLoading = false
}
var Button = function (element, options) { Button.VERSION = '3.1.1'
this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.isLoading = false
}
Button.VERSION = '3.1.1'
Button.DEFAULTS = {
loadingText: 'loading...'
}
Button.prototype.setState = function (state) { Button.DEFAULTS = {
var d = 'disabled' loadingText: 'loading...'
var $el = this.$element }
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state = state + 'Text' Button.prototype.setState = function (state) {
var d = 'disabled'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
if (data.resetText == null) $el.data('resetText', $el[val]()) state = state + 'Text'
$el[val](data[state] == null ? this.options[state] : data[state]) if (data.resetText == null) $el.data('resetText', $el[val]())
// push to event loop to allow forms to submit $el[val](data[state] == null ? this.options[state] : data[state])
setTimeout($.proxy(function () {
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
}
}, this), 0)
}
Button.prototype.toggle = function () { // push to event loop to allow forms to submit
var changed = true setTimeout($.proxy(function () {
var $parent = this.$element.closest('[data-toggle="buttons"]') if (state == 'loadingText') {
this.isLoading = true
if ($parent.length) { $el.addClass(d).attr(d, d)
var $input = this.$element.find('input') } else if (this.isLoading) {
if ($input.prop('type') == 'radio') { this.isLoading = false
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false $el.removeClass(d).removeAttr(d)
else $parent.find('.active').removeClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} }
}, this), 0)
if (changed) this.$element.toggleClass('active') }
Button.prototype.toggle = function () {
var changed = true
var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) {
var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
else $parent.find('.active').removeClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
} }
if (changed) this.$element.toggleClass('active')
}
// BUTTON PLUGIN DEFINITION
// ========================
function Plugin(option) { // BUTTON PLUGIN DEFINITION
return this.each(function () { // ========================
var $this = $(this)
var data = $this.data('bs.button')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.button', (data = new Button(this, options))) function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.button')
var options = typeof option == 'object' && option
if (option == 'toggle') data.toggle() if (!data) $this.data('bs.button', (data = new Button(this, options)))
else if (option) data.setState(option)
})
}
var old = $.fn.button if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button = Plugin var old = $.fn.button
$.fn.button.Constructor = Button
$.fn.button = Plugin
$.fn.button.Constructor = Button
// BUTTON NO CONFLICT
// ==================
$.fn.button.noConflict = function () { // BUTTON NO CONFLICT
$.fn.button = old // ==================
return this
}
$.fn.button.noConflict = function () {
$.fn.button = old
return this
}
// BUTTON DATA-API
// ===============
$(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { // BUTTON DATA-API
var $btn = $(e.target) // ===============
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
e.preventDefault()
})
$(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
e.preventDefault()
}) })
}(); }(jQuery);
This diff is collapsed.
...@@ -7,170 +7,164 @@ ...@@ -7,170 +7,164 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // COLLAPSE PUBLIC CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ================================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// COLLAPSE PUBLIC CLASS DEFINITION var Collapse = function (element, options) {
// ================================ this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.transitioning = null
var Collapse = function (element, options) { if (this.options.parent) this.$parent = $(this.options.parent)
this.$element = $(element) if (this.options.toggle) this.toggle()
this.options = $.extend({}, Collapse.DEFAULTS, options) }
this.transitioning = null
if (this.options.parent) this.$parent = $(this.options.parent) Collapse.VERSION = '3.1.1'
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.1.1' Collapse.DEFAULTS = {
toggle: true
}
Collapse.DEFAULTS = { Collapse.prototype.dimension = function () {
toggle: true var hasWidth = this.$element.hasClass('width')
} return hasWidth ? 'width' : 'height'
}
Collapse.prototype.dimension = function () { Collapse.prototype.show = function () {
var hasWidth = this.$element.hasClass('width') if (this.transitioning || this.$element.hasClass('in')) return
return hasWidth ? 'width' : 'height'
}
Collapse.prototype.show = function () { var startEvent = $.Event('show.bs.collapse')
if (this.transitioning || this.$element.hasClass('in')) return this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var startEvent = $.Event('show.bs.collapse') var actives = this.$parent && this.$parent.find('> .panel > .in')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var actives = this.$parent && this.$parent.find('> .panel > .in') if (actives && actives.length) {
var hasData = actives.data('bs.collapse')
if (hasData && hasData.transitioning) return
Plugin.call(actives, 'hide')
hasData || actives.data('bs.collapse', null)
}
var dimension = this.dimension()
if (actives && actives.length) { this.$element
var hasData = actives.data('bs.collapse') .removeClass('collapse')
if (hasData && hasData.transitioning) return .addClass('collapsing')[dimension](0)
Plugin.call(actives, 'hide')
hasData || actives.data('bs.collapse', null)
}
var dimension = this.dimension() this.transitioning = 1
var complete = function () {
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element this.$element
.removeClass('collapse') .trigger('shown.bs.collapse')
.addClass('collapsing')[dimension](0) }
this.transitioning = 1 if (!$.support.transition) return complete.call(this)
var complete = function () { var scrollSize = $.camelCase(['scroll', dimension].join('-'))
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element
.trigger('shown.bs.collapse')
}
if (!$.support.transition) return complete.call(this) this.$element
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
}
var scrollSize = $.camelCase(['scroll', dimension].join('-')) Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
this.$element var startEvent = $.Event('hide.bs.collapse')
.one('bsTransitionEnd', $.proxy(complete, this)) this.$element.trigger(startEvent)
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) if (startEvent.isDefaultPrevented()) return
}
Collapse.prototype.hide = function () { var dimension = this.dimension()
if (this.transitioning || !this.$element.hasClass('in')) return
var startEvent = $.Event('hide.bs.collapse') this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var dimension = this.dimension() this.$element
.addClass('collapsing')
.removeClass('collapse')
.removeClass('in')
this.$element[dimension](this.$element[dimension]())[0].offsetHeight this.transitioning = 1
var complete = function () {
this.transitioning = 0
this.$element this.$element
.addClass('collapsing') .trigger('hidden.bs.collapse')
.removeClass('collapse') .removeClass('collapsing')
.removeClass('in') .addClass('collapse')
}
this.transitioning = 1 if (!$.support.transition) return complete.call(this)
var complete = function () { this.$element
this.transitioning = 0 [dimension](0)
this.$element .one('bsTransitionEnd', $.proxy(complete, this))
.trigger('hidden.bs.collapse') .emulateTransitionEnd(350)
.removeClass('collapsing') }
.addClass('collapse')
}
if (!$.support.transition) return complete.call(this) Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
this.$element
[dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)
}
Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
// COLLAPSE PLUGIN DEFINITION function Plugin(option) {
// ========================== return this.each(function () {
var $this = $(this)
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
function Plugin(option) { if (!data && options.toggle && option == 'show') option = !option
return this.each(function () { if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
var $this = $(this) if (typeof option == 'string') data[option]()
var data = $this.data('bs.collapse') })
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) }
if (!data && options.toggle && option == 'show') option = !option var old = $.fn.collapse
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.collapse $.fn.collapse = Plugin
$.fn.collapse.Constructor = Collapse
$.fn.collapse = Plugin
$.fn.collapse.Constructor = Collapse
// COLLAPSE NO CONFLICT
// ====================
// COLLAPSE NO CONFLICT $.fn.collapse.noConflict = function () {
// ==================== $.fn.collapse = old
return this
}
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
// COLLAPSE DATA-API
// =================
// COLLAPSE DATA-API $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
// ================= var href
var $this = $(this)
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
var $target = $(target)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
var parent = $this.attr('data-parent')
var $parent = parent && $(parent)
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { if (!data || !data.transitioning) {
var href if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
var $this = $(this) $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
var target = $this.attr('data-target') }
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var $target = $(target)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
var parent = $this.attr('data-parent')
var $parent = parent && $(parent)
if (!data || !data.transitioning) {
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
}
Plugin.call($target, option)
})
Plugin.call($target, option)
}) })
}(); }(jQuery);
...@@ -7,151 +7,145 @@ ...@@ -7,151 +7,145 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // DROPDOWN CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // =========================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// DROPDOWN CLASS DEFINITION var backdrop = '.dropdown-backdrop'
// ========================= var toggle = '[data-toggle="dropdown"]'
var Dropdown = function (element) {
$(element).on('click.bs.dropdown', this.toggle)
}
var backdrop = '.dropdown-backdrop' Dropdown.VERSION = '3.1.1'
var toggle = '[data-toggle="dropdown"]'
var Dropdown = function (element) {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.1.1'
Dropdown.prototype.toggle = function (e) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
if ($this.is('.disabled, :disabled')) return if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this) var $parent = getParent($this)
var isActive = $parent.hasClass('open') var isActive = $parent.hasClass('open')
clearMenus() clearMenus()
if (!isActive) { if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate // if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
} }
var relatedTarget = { relatedTarget: this } var relatedTarget = { relatedTarget: this }
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$this.trigger('focus') $this.trigger('focus')
$parent $parent
.toggleClass('open') .toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget) .trigger('shown.bs.dropdown', relatedTarget)
}
return false
} }
Dropdown.prototype.keydown = function (e) { return false
if (!/(38|40|27)/.test(e.keyCode)) return }
var $this = $(this)
e.preventDefault() Dropdown.prototype.keydown = function (e) {
e.stopPropagation() if (!/(38|40|27)/.test(e.keyCode)) return
if ($this.is('.disabled, :disabled')) return var $this = $(this)
var $parent = getParent($this) e.preventDefault()
var isActive = $parent.hasClass('open') e.stopPropagation()
if (!isActive || (isActive && e.keyCode == 27)) { if ($this.is('.disabled, :disabled')) return
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var desc = ' li:not(.divider):visible a' var $parent = getParent($this)
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) var isActive = $parent.hasClass('open')
if (!$items.length) return if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var index = $items.index($items.filter(':focus')) var desc = ' li:not(.divider):visible a'
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
if (e.keyCode == 38 && index > 0) index-- // up if (!$items.length) return
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items.eq(index).trigger('focus') var index = $items.index($items.filter(':focus'))
}
function clearMenus(e) { if (e.keyCode == 38 && index > 0) index-- // up
if (e && e.which === 3) return if (e.keyCode == 40 && index < $items.length - 1) index++ // down
$(backdrop).remove() if (!~index) index = 0
$(toggle).each(function () {
var $parent = getParent($(this))
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
function getParent($this) { $items.eq(index).trigger('focus')
var selector = $this.attr('data-target') }
if (!selector) { function clearMenus(e) {
selector = $this.attr('href') if (e && e.which === 3) return
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 $(backdrop).remove()
} $(toggle).each(function () {
var $parent = getParent($(this))
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
var $parent = selector && $(selector) function getParent($this) {
var selector = $this.attr('data-target')
return $parent && $parent.length ? $parent : $this.parent() if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }
var $parent = selector && $(selector)
// DROPDOWN PLUGIN DEFINITION return $parent && $parent.length ? $parent : $this.parent()
// ========================== }
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.dropdown')
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) // DROPDOWN PLUGIN DEFINITION
if (typeof option == 'string') data[option].call($this) // ==========================
})
} function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.dropdown')
var old = $.fn.dropdown if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown = Plugin var old = $.fn.dropdown
$.fn.dropdown.Constructor = Dropdown
$.fn.dropdown = Plugin
$.fn.dropdown.Constructor = Dropdown
// DROPDOWN NO CONFLICT
// ====================
$.fn.dropdown.noConflict = function () { // DROPDOWN NO CONFLICT
$.fn.dropdown = old // ====================
return this
}
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================
$(document) // APPLY TO STANDARD DROPDOWN ELEMENTS
.on('click.bs.dropdown.data-api', clearMenus) // ===================================
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
}) $(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
}(); }(jQuery);
This diff is collapsed.
...@@ -7,113 +7,107 @@ ...@@ -7,113 +7,107 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // POPOVER PUBLIC CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ===============================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// POPOVER PUBLIC CLASS DEFINITION var Popover = function (element, options) {
// =============================== this.init('popover', element, options)
}
var Popover = function (element, options) { if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
this.init('popover', element, options)
}
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') Popover.VERSION = '3.1.1'
Popover.VERSION = '3.1.1'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) // NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype.constructor = Popover Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.getDefaults = function () { Popover.prototype.constructor = Popover
return Popover.DEFAULTS
}
Popover.prototype.setContent = function () { Popover.prototype.getDefaults = function () {
var $tip = this.tip() return Popover.DEFAULTS
var title = this.getTitle() }
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) Popover.prototype.setContent = function () {
$tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events var $tip = this.tip()
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' var title = this.getTitle()
](content) var content = this.getContent()
$tip.removeClass('fade top bottom left right in') $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do $tip.removeClass('fade top bottom left right in')
// this manually by checking the contents.
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
}
Popover.prototype.hasContent = function () { // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
return this.getTitle() || this.getContent() // this manually by checking the contents.
} if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
}
Popover.prototype.getContent = function () { Popover.prototype.hasContent = function () {
var $e = this.$element return this.getTitle() || this.getContent()
var o = this.options }
return $e.attr('data-content') Popover.prototype.getContent = function () {
|| (typeof o.content == 'function' ? var $e = this.$element
o.content.call($e[0]) : var o = this.options
o.content)
}
Popover.prototype.arrow = function () { return $e.attr('data-content')
return (this.$arrow = this.$arrow || this.tip().find('.arrow')) || (typeof o.content == 'function' ?
} o.content.call($e[0]) :
o.content)
}
Popover.prototype.tip = function () { Popover.prototype.arrow = function () {
if (!this.$tip) this.$tip = $(this.options.template) return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
return this.$tip }
}
Popover.prototype.tip = function () {
if (!this.$tip) this.$tip = $(this.options.template)
return this.$tip
}
// POPOVER PLUGIN DEFINITION
// =========================
function Plugin(option) { // POPOVER PLUGIN DEFINITION
return this.each(function () { // =========================
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
if (!data && option == 'destroy') return function Plugin(option) {
if (!data) $this.data('bs.popover', (data = new Popover(this, options))) return this.each(function () {
if (typeof option == 'string') data[option]() var $this = $(this)
}) var data = $this.data('bs.popover')
} var options = typeof option == 'object' && option
var old = $.fn.popover if (!data && option == 'destroy') return
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover = Plugin var old = $.fn.popover
$.fn.popover.Constructor = Popover
$.fn.popover = Plugin
$.fn.popover.Constructor = Popover
// POPOVER NO CONFLICT
// ===================
$.fn.popover.noConflict = function () { // POPOVER NO CONFLICT
$.fn.popover = old // ===================
return this
}
}) $.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(); }(jQuery);
...@@ -7,170 +7,164 @@ ...@@ -7,170 +7,164 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // SCROLLSPY CLASS DEFINITION
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery) // ==========================
})(function ($) {
function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)
this.$body = $('body')
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target || '') + ' .nav li > a'
this.offsets = []
this.targets = []
this.activeTarget = null
this.scrollHeight = 0
this.$scrollElement.on('scroll.bs.scrollspy', process)
this.refresh()
this.process()
}
ScrollSpy.VERSION = '3.1.1'
ScrollSpy.DEFAULTS = {
offset: 10
}
ScrollSpy.prototype.getScrollHeight = function () {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}
ScrollSpy.prototype.refresh = function () {
var offsetMethod = 'offset'
var offsetBase = 0
if (!$.isWindow(this.$scrollElement[0])) {
offsetMethod = 'position'
offsetBase = this.$scrollElement.scrollTop()
}
// SCROLLSPY CLASS DEFINITION this.offsets = []
// ========================== this.targets = []
this.scrollHeight = this.getScrollHeight()
function ScrollSpy(element, options) { var self = this
var process = $.proxy(this.process, this)
this.$body = $('body') this.$body
this.$scrollElement = $(element).is('body') ? $(window) : $(element) .find(this.selector)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options) .map(function () {
this.selector = (this.options.target || '') + ' .nav li > a' var $el = $(this)
this.offsets = [] var href = $el.data('target') || $el.attr('href')
this.targets = [] var $href = /^#./.test(href) && $(href)
this.activeTarget = null
this.scrollHeight = 0
this.$scrollElement.on('scroll.bs.scrollspy', process) return ($href
&& $href.length
&& $href.is(':visible')
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
var scrollHeight = this.getScrollHeight()
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (this.scrollHeight != scrollHeight) {
this.refresh() this.refresh()
this.process()
} }
ScrollSpy.VERSION = '3.1.1' if (scrollTop >= maxScroll) {
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
ScrollSpy.DEFAULTS = {
offset: 10
} }
ScrollSpy.prototype.getScrollHeight = function () { if (activeTarget && scrollTop <= offsets[0]) {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) return activeTarget != (i = targets[0]) && this.activate(i)
} }
ScrollSpy.prototype.refresh = function () { for (i = offsets.length; i--;) {
var offsetMethod = 'offset' activeTarget != targets[i]
var offsetBase = 0 && scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
if (!$.isWindow(this.$scrollElement[0])) { && this.activate(targets[i])
offsetMethod = 'position'
offsetBase = this.$scrollElement.scrollTop()
}
this.offsets = []
this.targets = []
this.scrollHeight = this.getScrollHeight()
var self = this
this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')
var $href = /^#./.test(href) && $(href)
return ($href
&& $href.length
&& $href.is(':visible')
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
} }
}
ScrollSpy.prototype.process = function () { ScrollSpy.prototype.activate = function (target) {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset this.activeTarget = target
var scrollHeight = this.getScrollHeight()
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (this.scrollHeight != scrollHeight) {
this.refresh()
}
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
}
if (activeTarget && scrollTop <= offsets[0]) {
return activeTarget != (i = targets[0]) && this.activate(i)
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate(targets[i])
}
}
ScrollSpy.prototype.activate = function (target) { $(this.selector)
this.activeTarget = target .parentsUntil(this.options.target, '.active')
.removeClass('active')
$(this.selector) var selector = this.selector +
.parentsUntil(this.options.target, '.active') '[data-target="' + target + '"],' +
.removeClass('active') this.selector + '[href="' + target + '"]'
var selector = this.selector + var active = $(selector)
'[data-target="' + target + '"],' + .parents('li')
this.selector + '[href="' + target + '"]' .addClass('active')
var active = $(selector) if (active.parent('.dropdown-menu').length) {
.parents('li') active = active
.closest('li.dropdown')
.addClass('active') .addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate.bs.scrollspy')
} }
active.trigger('activate.bs.scrollspy')
}
// SCROLLSPY PLUGIN DEFINITION
// ===========================
function Plugin(option) { // SCROLLSPY PLUGIN DEFINITION
return this.each(function () { // ===========================
var $this = $(this)
var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) function Plugin(option) {
if (typeof option == 'string') data[option]() return this.each(function () {
}) var $this = $(this)
} var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
var old = $.fn.scrollspy if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy = Plugin var old = $.fn.scrollspy
$.fn.scrollspy.Constructor = ScrollSpy
$.fn.scrollspy = Plugin
$.fn.scrollspy.Constructor = ScrollSpy
// SCROLLSPY NO CONFLICT
// =====================
$.fn.scrollspy.noConflict = function () { // SCROLLSPY NO CONFLICT
$.fn.scrollspy = old // =====================
return this
}
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
// SCROLLSPY DATA-API
// ==================
$(window).on('load.bs.scrollspy.data-api', function () { // SCROLLSPY DATA-API
$('[data-spy="scroll"]').each(function () { // ==================
var $spy = $(this)
Plugin.call($spy, $spy.data())
})
})
$(window).on('load.bs.scrollspy.data-api', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
Plugin.call($spy, $spy.data())
})
}) })
}(); }(jQuery);
...@@ -7,128 +7,122 @@ ...@@ -7,128 +7,122 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // TAB CLASS DEFINITION
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ====================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// TAB CLASS DEFINITION var Tab = function (element) {
// ==================== this.element = $(element)
}
var Tab = function (element) { Tab.VERSION = '3.1.1'
this.element = $(element)
}
Tab.VERSION = '3.1.1'
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var previous = $ul.find('.active:last a')[0] Tab.prototype.show = function () {
var e = $.Event('show.bs.tab', { var $this = this.element
relatedTarget: previous var $ul = $this.closest('ul:not(.dropdown-menu)')
}) var selector = $this.data('target')
$this.trigger(e)
if (e.isDefaultPrevented()) return if (!selector) {
selector = $this.attr('href')
var $target = $(selector) selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: previous
})
})
} }
Tab.prototype.activate = function (element, container, callback) { if ($this.parent('li').hasClass('active')) return
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() { var previous = $ul.find('.active:last a')[0]
$active var e = $.Event('show.bs.tab', {
.removeClass('active') relatedTarget: previous
.find('> .dropdown-menu > .active') })
.removeClass('active')
element.addClass('active') $this.trigger(e)
if (transition) { if (e.isDefaultPrevented()) return
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu')) { var $target = $(selector)
element.closest('li.dropdown').addClass('active')
}
callback && callback() this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: previous
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
} }
transition ? if (element.parent('.dropdown-menu')) {
$active element.closest('li.dropdown').addClass('active')
.one('bsTransitionEnd', next) }
.emulateTransitionEnd(150) :
next()
$active.removeClass('in') callback && callback()
} }
transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(150) :
next()
// TAB PLUGIN DEFINITION $active.removeClass('in')
// ===================== }
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this))) // TAB PLUGIN DEFINITION
if (typeof option == 'string') data[option]() // =====================
})
}
var old = $.fn.tab function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
$.fn.tab = Plugin if (!data) $this.data('bs.tab', (data = new Tab(this)))
$.fn.tab.Constructor = Tab if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tab
// TAB NO CONFLICT $.fn.tab = Plugin
// =============== $.fn.tab.Constructor = Tab
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB NO CONFLICT
// ===============
// TAB DATA-API $.fn.tab.noConflict = function () {
// ============ $.fn.tab = old
return this
}
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
})
// TAB DATA-API
// ============
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
}) })
}(); }(jQuery);
This diff is collapsed.
...@@ -7,59 +7,53 @@ ...@@ -7,59 +7,53 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) { // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
typeof define == 'function' && define.amd ? define(['jquery'], o_o) : // ============================================================
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) function transitionEnd() {
// ============================================================ var el = document.createElement('bootstrap')
function transitionEnd() { var transEndEventNames = {
var el = document.createElement('bootstrap') WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
var transEndEventNames = { OTransition : 'oTransitionEnd otransitionend',
WebkitTransition : 'webkitTransitionEnd', transition : 'transitionend'
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
} }
// http://blog.alexmaccaw.com/css-transitions for (var name in transEndEventNames) {
$.fn.emulateTransitionEnd = function (duration) { if (el.style[name] !== undefined) {
var called = false return { end: transEndEventNames[name] }
var $el = this }
$(this).one('bsTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
} }
$(function () { return false // explicit for ie8 ( ._.)
$.support.transition = transitionEnd() }
if (!$.support.transition) return // http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
$.event.special.bsTransitionEnd = { var called = false
bindType: $.support.transition.end, var $el = this
delegateType: $.support.transition.end, $(this).one('bsTransitionEnd', function () { called = true })
handle: function (e) { var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) setTimeout(callback, duration)
} return this
}
$(function () {
$.support.transition = transitionEnd()
if (!$.support.transition) return
$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
} }
}) }
}) })
}(); }(jQuery);
...@@ -33,11 +33,12 @@ ...@@ -33,11 +33,12 @@
} }
} }
// Dismissable alerts // Dismissible alerts
// //
// Expand the right padding and account for the close button's positioning. // Expand the right padding and account for the close button's positioning.
.alert-dismissable { .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
.alert-dismissible {
padding-right: (@alert-padding + 20); padding-right: (@alert-padding + 20);
// Adjust close link position // Adjust close link position
......
...@@ -140,8 +140,6 @@ ...@@ -140,8 +140,6 @@
.btn-block { .btn-block {
display: block; display: block;
width: 100%; width: 100%;
padding-left: 0;
padding-right: 0;
} }
// Vertically space out multiple block buttons // Vertically space out multiple block buttons
......
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
font-size: @font-size-small; font-size: @font-size-small;
line-height: @line-height-base; line-height: @line-height-base;
color: @dropdown-header-color; color: @dropdown-header-color;
white-space: nowrap; // as with > li > a
} }
// Backdrop to catch body clicks on mobile, etc. // Backdrop to catch body clicks on mobile, etc.
......
...@@ -281,6 +281,26 @@ input[type="checkbox"] { ...@@ -281,6 +281,26 @@ input[type="checkbox"] {
} }
// Static form control text
//
// Apply class to a `p` element to make any string of text align with labels in
// a horizontal form layout.
.form-control-static {
// Size it appropriately next to real form controls
padding-top: (@padding-base-vertical + 1);
padding-bottom: (@padding-base-vertical + 1);
// Remove default margin from `p`
margin-bottom: 0;
&.input-lg,
&.input-sm {
padding-left: 0;
padding-right: 0;
}
}
// Form control sizing // Form control sizing
// //
// Build on `.form-control` with modifier classes to decrease or increase the // Build on `.form-control` with modifier classes to decrease or increase the
...@@ -349,16 +369,6 @@ input[type="checkbox"] { ...@@ -349,16 +369,6 @@ input[type="checkbox"] {
} }
// Static form control text
//
// Apply class to a `p` element to make any string of text align with labels in
// a horizontal form layout.
.form-control-static {
margin-bottom: 0; // Remove default margin from `p`
}
// Help text // Help text
// //
// Apply to any element you wish to create light text for placement immediately // Apply to any element you wish to create light text for placement immediately
...@@ -484,11 +494,6 @@ input[type="checkbox"] { ...@@ -484,11 +494,6 @@ input[type="checkbox"] {
.make-row(); .make-row();
} }
.form-control-static {
padding-top: (@padding-base-vertical + 1);
padding-bottom: (@padding-base-vertical + 1);
}
// Reset spacing and right align labels, but scope to media queries so that // Reset spacing and right align labels, but scope to media queries so that
// labels on narrow viewports stack the same as a default form example. // labels on narrow viewports stack the same as a default form example.
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
...@@ -507,4 +512,29 @@ input[type="checkbox"] { ...@@ -507,4 +512,29 @@ input[type="checkbox"] {
top: 0; top: 0;
right: (@grid-gutter-width / 2); right: (@grid-gutter-width / 2);
} }
// Form group sizes
//
// Quick utility class for applying `.input-lg` and `.input-sm` styles to the
// inputs and labels within a `.form-group`.
.form-group-lg {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
}
}
.form-control {
&:extend(.input-lg);
}
}
.form-group-sm {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: (@padding-small-vertical + 1);
}
}
.form-control {
&:extend(.input-sm);
}
}
} }
...@@ -94,7 +94,9 @@ a.list-group-item { ...@@ -94,7 +94,9 @@ a.list-group-item {
border-color: @list-group-active-border; border-color: @list-group-active-border;
// Force color to inherit for custom content // Force color to inherit for custom content
.list-group-item-heading { .list-group-item-heading,
.list-group-item-heading > small,
.list-group-item-heading > .small {
color: inherit; color: inherit;
} }
.list-group-item-text { .list-group-item-text {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
// Keep images from scaling beyond the width of their parents. // Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block) { .img-responsive(@display: block) {
display: @display; display: @display;
width: 100% \9; // Force IE10 and below to size SVG images correctly
max-width: 100%; // Part 1: Set a maximum relative to the parent max-width: 100%; // Part 1: Set a maximum relative to the parent
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
} }
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
.progress-bar-variant(@color) { .progress-bar-variant(@color) {
background-color: @color; background-color: @color;
// Deprecated parent class requirement as of v3.2.0
.progress-striped & { .progress-striped & {
#gradient > .striped(); #gradient > .striped();
} }
......
// Vendor Prefixes // Vendor Prefixes
// //
// All vendor mixins are deprecated as of v3.2 due to the introduction of // All vendor mixins are deprecated as of v3.2.0 due to the introduction of
// Autoprefixer in our Gruntfile. They will be removed in v4. // Autoprefixer in our Gruntfile. They will be removed in v4.
// - Animations // - Animations
...@@ -131,10 +131,10 @@ ...@@ -131,10 +131,10 @@
transform: scaleY(@ratio); transform: scaleY(@ratio);
} }
.skew(@x; @y) { .skew(@x; @y) {
-webkit-transform: skew(@x, @y); -webkit-transform: skewX(@x) skewY(@y);
-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
-o-transform: skew(@x, @y); -o-transform: skewX(@x) skewY(@y);
transform: skew(@x, @y); transform: skewX(@x) skewY(@y);
} }
.translate(@x; @y) { .translate(@x; @y) {
-webkit-transform: translate(@x, @y); -webkit-transform: translate(@x, @y);
......
...@@ -41,13 +41,22 @@ ...@@ -41,13 +41,22 @@
} }
// Striped bars // Striped bars
.progress-striped .progress-bar { //
// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
// `.progress-bar-striped` class, which you just add to an existing
// `.progress-bar`.
.progress-striped .progress-bar,
.progress-bar-striped {
#gradient > .striped(); #gradient > .striped();
background-size: 40px 40px; background-size: 40px 40px;
} }
// Call animation for the active one // Call animation for the active one
.progress.active .progress-bar { //
// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
// `.progress-bar.active` approach.
.progress.active .progress-bar,
.progress-bar.active {
.animation(progress-bar-stripes 2s linear infinite); .animation(progress-bar-stripes 2s linear infinite);
} }
......
...@@ -48,6 +48,12 @@ ...@@ -48,6 +48,12 @@
background-color: darken(@btn-color, 12%); background-color: darken(@btn-color, 12%);
border-color: darken(@btn-color, 14%); border-color: darken(@btn-color, 14%);
} }
&:disabled,
&[disabled] {
background-color: darken(@btn-color, 12%);
background-image: none;
}
} }
// Common styles // Common styles
...@@ -191,6 +197,11 @@ ...@@ -191,6 +197,11 @@
.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); } .progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); } .progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
// Reset the striped class because our mixins don't do multiple gradients and
// the above custom styles override the new `.progress-bar-striped` in v3.2.0.
.progress-bar-striped {
#gradient > .striped();
}
// //
......
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@gray-darker: lighten(#000, 13.5%); // #222 @gray-darker: lighten(#000, 13.5%); // #222
@gray-dark: lighten(#000, 20%); // #333 @gray-dark: lighten(#000, 20%); // #333
@gray: lighten(#000, 33.5%); // #555 @gray: lighten(#000, 33.5%); // #555
@gray-light: lighten(#000, 60%); // #999 @gray-light: lighten(#000, 46.7%); // #777
@gray-lighter: lighten(#000, 93.5%); // #eee @gray-lighter: lighten(#000, 93.5%); // #eee
@brand-primary: #428bca; @brand-primary: #428bca;
...@@ -836,6 +836,8 @@ ...@@ -836,6 +836,8 @@
@blockquote-border-color: @gray-lighter; @blockquote-border-color: @gray-lighter;
//** Page header border color //** Page header border color
@page-header-border-color: @gray-lighter; @page-header-border-color: @gray-lighter;
//** Width of horizontal description list titles
@dl-horizontal-offset: @component-offset-horizontal;
//== Miscellaneous //== Miscellaneous
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment