mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Merge branch 'master' into derp
Conflicts: Gruntfile.js dist/css/bootstrap-theme.css.map dist/css/bootstrap.css dist/css/bootstrap.css.map dist/css/bootstrap.min.css dist/fonts/glyphicons-halflings-regular.svg docs/_includes/components/badges.html docs/_includes/components/input-groups.html docs/_includes/components/pagination.html docs/_includes/css/forms.html docs/_includes/footer.html docs/_includes/getting-started/browser-device-support.html docs/_includes/getting-started/grunt.html docs/_includes/home-nav.html docs/_includes/js/alerts.html docs/_includes/js/buttons.html docs/_includes/js/carousel.html docs/_includes/js/collapse.html docs/_includes/js/modal.html docs/_includes/js/popovers.html docs/_includes/js/tooltips.html docs/_includes/nav/getting-started.html docs/_includes/nav/javascript.html docs/assets/css/docs.min.css docs/assets/css/src/docs.css docs/assets/js/customize.min.js docs/assets/js/raw-files.min.js docs/browser-bugs.html docs/dist/css/bootstrap-theme.css.map docs/dist/css/bootstrap.css docs/dist/css/bootstrap.css.map docs/dist/css/bootstrap.min.css docs/dist/fonts/glyphicons-halflings-regular.svg fonts/glyphicons-halflings-regular.svg less/_button-group.less less/_jumbotron.less less/_variables.less less/mixins/vendor-prefixes.less less/panels.less less/thumbnails.less package.json
This commit is contained in:
commit
9f2aeafe85
10
.travis.yml
10
.travis.yml
@ -1,8 +1,10 @@
|
||||
language: node_js
|
||||
git:
|
||||
depth: 10
|
||||
node_js:
|
||||
- "0.10"
|
||||
before_install:
|
||||
- time travis_retry sudo pip install -r test-infra/requirements.txt
|
||||
- travis_retry sudo pip install -r test-infra/requirements.txt
|
||||
- rvm use 1.9.3 --fuzzy
|
||||
- export GEMDIR=$(rvm gemdir)
|
||||
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION rouge=$ROUGE_VERSION" > pseudo_Gemfile.lock; fi
|
||||
@ -10,7 +12,7 @@ before_install:
|
||||
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true
|
||||
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
|
||||
install:
|
||||
- time npm install -g grunt-cli
|
||||
- npm install -g grunt-cli
|
||||
- ./test-infra/s3_cache.py download npm-modules
|
||||
- if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py download rubygems; fi
|
||||
after_script:
|
||||
@ -18,8 +20,8 @@ after_script:
|
||||
- if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py upload rubygems; fi
|
||||
env:
|
||||
global:
|
||||
- JEKYLL_VERSION: 2.1.1
|
||||
- ROUGE_VERSION: 1.6.1
|
||||
- JEKYLL_VERSION: 2.3.0
|
||||
- ROUGE_VERSION: 1.6.2
|
||||
- SAUCE_USERNAME: bootstrap
|
||||
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
|
||||
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="
|
||||
|
@ -184,4 +184,3 @@ Run `grunt test` before committing to ensure your changes follow our coding stan
|
||||
By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE).
|
||||
|
||||
Prior to v3.1.0, Bootstrap was released under the Apache License v2.0.
|
||||
|
||||
|
116
Gruntfile.js
116
Gruntfile.js
@ -19,6 +19,12 @@ module.exports = function (grunt) {
|
||||
var path = require('path');
|
||||
var npmShrinkwrap = require('npm-shrinkwrap');
|
||||
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
|
||||
var getLessVarsData = function () {
|
||||
var filePath = path.join(__dirname, 'less/_variables.less');
|
||||
var fileContent = fs.readFileSync(filePath, { encoding: 'utf8' });
|
||||
var parser = new BsLessdocParser(fileContent);
|
||||
return { sections: parser.parseFile() };
|
||||
};
|
||||
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
|
||||
|
||||
// Project configuration.
|
||||
@ -36,7 +42,8 @@ module.exports = function (grunt) {
|
||||
|
||||
// Task configuration.
|
||||
clean: {
|
||||
dist: ['dist', 'docs/dist']
|
||||
dist: 'dist',
|
||||
docs: 'docs/dist'
|
||||
},
|
||||
|
||||
jshint: {
|
||||
@ -49,7 +56,7 @@ module.exports = function (grunt) {
|
||||
},
|
||||
src: ['Gruntfile.js', 'grunt/*.js']
|
||||
},
|
||||
src: {
|
||||
core: {
|
||||
src: 'js/*.js'
|
||||
},
|
||||
test: {
|
||||
@ -70,8 +77,8 @@ module.exports = function (grunt) {
|
||||
grunt: {
|
||||
src: '<%= jshint.grunt.src %>'
|
||||
},
|
||||
src: {
|
||||
src: '<%= jshint.src.src %>'
|
||||
core: {
|
||||
src: '<%= jshint.core.src %>'
|
||||
},
|
||||
test: {
|
||||
src: '<%= jshint.test.src %>'
|
||||
@ -112,7 +119,7 @@ module.exports = function (grunt) {
|
||||
options: {
|
||||
preserveComments: 'some'
|
||||
},
|
||||
bootstrap: {
|
||||
core: {
|
||||
src: '<%= concat.bootstrap.dest %>',
|
||||
dest: 'dist/js/<%= pkg.name %>.min.js'
|
||||
},
|
||||
@ -155,9 +162,8 @@ module.exports = function (grunt) {
|
||||
sourceMapURL: '<%= pkg.name %>.css.map',
|
||||
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
|
||||
},
|
||||
files: {
|
||||
'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less'
|
||||
}
|
||||
src: 'less/bootstrap.less',
|
||||
dest: 'dist/css/<%= pkg.name %>.css'
|
||||
},
|
||||
compileDocs: {
|
||||
options: {
|
||||
@ -199,25 +205,6 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
csslint: {
|
||||
options: {
|
||||
csslintrc: 'less/.csslintrc'
|
||||
},
|
||||
src: [
|
||||
'dist/css/bootstrap.css'
|
||||
],
|
||||
examples: [
|
||||
'docs/examples/**/*.css'
|
||||
],
|
||||
docs: {
|
||||
options: {
|
||||
ids: false,
|
||||
'overqualified-elements': false
|
||||
},
|
||||
src: 'docs/assets/css/docs.css'
|
||||
}
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
options: {
|
||||
compatibility: 'ie8',
|
||||
@ -262,22 +249,15 @@ module.exports = function (grunt) {
|
||||
dest: 'docs/examples/'
|
||||
},
|
||||
docs: {
|
||||
files: {
|
||||
'docs/assets/css/src/docs.css': 'docs/assets/css/src/docs.css'
|
||||
}
|
||||
src: 'docs/assets/css/src/docs.css',
|
||||
dest: 'docs/assets/css/src/docs.css'
|
||||
}
|
||||
},
|
||||
|
||||
copy: {
|
||||
docs: {
|
||||
expand: true,
|
||||
cwd: './dist',
|
||||
src: [
|
||||
'css/*',
|
||||
'js/*',
|
||||
'fonts/*'
|
||||
],
|
||||
dest: 'docs/dist'
|
||||
src: 'dist/*/*',
|
||||
dest: 'docs/'
|
||||
}
|
||||
},
|
||||
|
||||
@ -295,20 +275,17 @@ module.exports = function (grunt) {
|
||||
},
|
||||
|
||||
jade: {
|
||||
compile: {
|
||||
options: {
|
||||
pretty: true,
|
||||
data: function () {
|
||||
var filePath = path.join(__dirname, 'less/variables.less');
|
||||
var fileContent = fs.readFileSync(filePath, { encoding: 'utf8' });
|
||||
var parser = new BsLessdocParser(fileContent);
|
||||
return { sections: parser.parseFile() };
|
||||
}
|
||||
},
|
||||
files: {
|
||||
'docs/_includes/customizer-variables.html': 'docs/_jade/customizer-variables.jade',
|
||||
'docs/_includes/customize-nav.html': 'docs/_jade/customizer-nav.jade'
|
||||
}
|
||||
options: {
|
||||
pretty: true,
|
||||
data: getLessVarsData
|
||||
},
|
||||
customizerVars: {
|
||||
src: 'docs/_jade/customizer-variables.jade',
|
||||
dest: 'docs/_includes/customizer-variables.html'
|
||||
},
|
||||
customizerNav: {
|
||||
src: 'docs/_jade/customizer-nav.jade',
|
||||
dest: 'docs/_includes/nav/customize.html'
|
||||
}
|
||||
},
|
||||
|
||||
@ -321,7 +298,11 @@ module.exports = function (grunt) {
|
||||
relaxerror: [
|
||||
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
|
||||
'Element img is missing required attribute src.',
|
||||
'Attribute autocomplete not allowed on element input at this point.'
|
||||
'Attribute autocomplete not allowed on element input at this point.',
|
||||
'Attribute autocomplete not allowed on element button at this point.',
|
||||
'Element div not allowed as child of element progress in this context.',
|
||||
'Element thead not allowed as child of element table in this context.',
|
||||
'Bad value tablist for attribute role on element nav.'
|
||||
]
|
||||
},
|
||||
files: {
|
||||
@ -331,8 +312,8 @@ module.exports = function (grunt) {
|
||||
|
||||
watch: {
|
||||
src: {
|
||||
files: '<%= jshint.src.src %>',
|
||||
tasks: ['jshint:src', 'qunit']
|
||||
files: '<%= jshint.core.src %>',
|
||||
tasks: ['jshint:src', 'qunit', 'concat']
|
||||
},
|
||||
test: {
|
||||
files: '<%= jshint.test.src %>',
|
||||
@ -397,7 +378,7 @@ module.exports = function (grunt) {
|
||||
var testSubtasks = [];
|
||||
// Skip core tests if running a different subset of the test suite
|
||||
if (runSubset('core')) {
|
||||
testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit']);
|
||||
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit', 'docs']);
|
||||
}
|
||||
// Skip HTML validation if running a different subset of the test suite
|
||||
if (runSubset('validate-html') &&
|
||||
@ -417,24 +398,17 @@ module.exports = function (grunt) {
|
||||
grunt.registerTask('test', testSubtasks);
|
||||
|
||||
// JS distribution task.
|
||||
grunt.registerTask('dist-js', ['concat', 'uglify']);
|
||||
grunt.registerTask('dist-js', ['concat', 'uglify:core']);
|
||||
|
||||
// CSS distribution task.
|
||||
grunt.registerTask('less-compile', ['less:compileDocs', 'less:compileCore']);
|
||||
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'usebanner', 'csscomb', 'cssmin']);
|
||||
|
||||
// Docs distribution task.
|
||||
grunt.registerTask('dist-docs', 'copy:docs');
|
||||
grunt.registerTask('less-compile', ['less:compileCore']);
|
||||
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'usebanner', 'csscomb:dist', 'cssmin:core']);
|
||||
|
||||
// Full distribution task.
|
||||
grunt.registerTask('dist', ['clean', 'dist-css', 'dist-js', 'dist-docs']);
|
||||
|
||||
// Custom docs rebuild task.
|
||||
grunt.registerTask('build', ['clean', 'less-compile', 'autoprefixer:core', 'autoprefixer:docs', 'usebanner', 'csscomb:dist', 'cssmin:core', 'cssmin:docs', 'concat', 'uglify:bootstrap', 'dist-docs']);
|
||||
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']);
|
||||
|
||||
// Default task.
|
||||
// grunt.registerTask('default', ['test', 'dist']);
|
||||
grunt.registerTask('default', ['dist']);
|
||||
grunt.registerTask('default', ['clean:dist', 'test']);
|
||||
|
||||
// Version numbering task.
|
||||
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
|
||||
@ -449,6 +423,12 @@ module.exports = function (grunt) {
|
||||
generateRawFiles(grunt, banner);
|
||||
});
|
||||
|
||||
// Docs task.
|
||||
grunt.registerTask('docs-css', ['autoprefixer:docs', 'autoprefixer:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
|
||||
grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']);
|
||||
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']);
|
||||
grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-customizer']);
|
||||
|
||||
// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
|
||||
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
|
||||
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']);
|
||||
|
41
README.md
41
README.md
@ -1,32 +1,33 @@
|
||||
# [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)
|
||||
[![Build Status](https://secure.travis-ci.org/twbs/bootstrap.svg?branch=master)](https://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)
|
||||
|
||||
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](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community.
|
||||
|
||||
To get started, check out <http://getbootstrap.com>!
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Quick start](#quick-start)
|
||||
- [Bugs and feature requests](#bugs-and-feature-requests)
|
||||
- [Documentation](#documentation)
|
||||
- [Contributing](#contributing)
|
||||
- [Community](#community)
|
||||
- [Versioning](#versioning)
|
||||
- [Creators](#creators)
|
||||
- [Copyright and license](#copyright-and-license)
|
||||
- [Quick start](#quick-start)
|
||||
- [Bugs and feature requests](#bugs-and-feature-requests)
|
||||
- [Documentation](#documentation)
|
||||
- [Contributing](#contributing)
|
||||
- [Community](#community)
|
||||
- [Versioning](#versioning)
|
||||
- [Creators](#creators)
|
||||
- [Copyright and license](#copyright-and-license)
|
||||
|
||||
## Quick start
|
||||
|
||||
Three quick start options are available:
|
||||
Four quick start options are available:
|
||||
|
||||
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.2.0.zip).
|
||||
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
|
||||
- Install with [Bower](http://bower.io): `bower install bootstrap`.
|
||||
- Install with [npm](https://www.npmjs.org): `npm install bootstrap`.
|
||||
|
||||
Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
|
||||
|
||||
@ -66,8 +67,8 @@ Bootstrap's documentation, included in this repo in the root directory, is built
|
||||
|
||||
### Running documentation locally
|
||||
|
||||
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.1.x).
|
||||
- **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems.
|
||||
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.3.x).
|
||||
- **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
|
||||
2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
|
||||
3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
|
||||
4. Open <http://localhost:9001> in your browser, and voilà.
|
||||
@ -86,7 +87,7 @@ Documentation for v2.3.2 has been made available for the time being at <http://g
|
||||
|
||||
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
||||
|
||||
Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
|
||||
Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
||||
|
||||
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
|
||||
|
||||
@ -96,9 +97,9 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
|
||||
|
||||
Keep track of development and community news.
|
||||
|
||||
- Follow [@twbootstrap on Twitter](http://twitter.com/twbootstrap).
|
||||
- Follow [@twbootstrap on Twitter](https://twitter.com/twbootstrap).
|
||||
- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##twitter-bootstrap` channel.
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
|
||||
|
||||
|
||||
@ -113,13 +114,13 @@ For transparency into our release cycle and in striving to maintain backward com
|
||||
|
||||
**Mark Otto**
|
||||
|
||||
- <http://twitter.com/mdo>
|
||||
- <http://github.com/mdo>
|
||||
- <https://twitter.com/mdo>
|
||||
- <https://github.com/mdo>
|
||||
|
||||
**Jacob Thornton**
|
||||
|
||||
- <http://twitter.com/fat>
|
||||
- <http://github.com/fat>
|
||||
- <https://twitter.com/fat>
|
||||
- <https://github.com/fat>
|
||||
|
||||
|
||||
|
||||
|
44
dist/css/bootstrap.css
vendored
44
dist/css/bootstrap.css
vendored
@ -205,8 +205,8 @@ th {
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
a[href^="javascript:"]:after,
|
||||
a[href^="#"]:after {
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
pre,
|
||||
@ -241,10 +241,6 @@ th {
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.btn > .caret,
|
||||
.dropup > .btn > .caret {
|
||||
border-top-color: #000 !important;
|
||||
@ -255,6 +251,10 @@ th {
|
||||
.table {
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.table-bordered th,
|
||||
.table-bordered td {
|
||||
border: 1px solid #ddd !important;
|
||||
@ -2933,8 +2933,8 @@ tbody.collapse.in {
|
||||
[data-toggle="buttons"] > .btn input[type="checkbox"],
|
||||
[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
}
|
||||
.input-group {
|
||||
position: relative;
|
||||
@ -3500,6 +3500,9 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
||||
.navbar-form .form-group {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.navbar-form .form-group:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@media (min-width: 48em) {
|
||||
.navbar-form {
|
||||
@ -3659,7 +3662,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
}
|
||||
.navbar-inverse .navbar-brand > a,
|
||||
.navbar-inverse .nav-pills > .nav-item > .nav-link {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-brand > a:hover,
|
||||
.navbar-inverse .nav-pills > .nav-item > .nav-link:hover,
|
||||
@ -3678,7 +3681,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
background-color: #1f2021;
|
||||
}
|
||||
.navbar-inverse .navbar-brand {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-brand:hover,
|
||||
.navbar-inverse .navbar-brand:focus {
|
||||
@ -3689,7 +3692,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
color: #a2a8ae;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > li > a:hover,
|
||||
.navbar-inverse .navbar-nav > li > a:focus {
|
||||
@ -3736,7 +3739,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
background-color: #1f2021;
|
||||
}
|
||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
|
||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
|
||||
@ -3757,13 +3760,13 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
}
|
||||
}
|
||||
.navbar-inverse .navbar-link {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-link:hover {
|
||||
color: #fff;
|
||||
}
|
||||
.navbar-inverse .btn-link {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .btn-link:hover,
|
||||
.navbar-inverse .btn-link:focus {
|
||||
@ -4164,7 +4167,7 @@ a.list-group-item.active > .badge,
|
||||
margin-left: 3px;
|
||||
}
|
||||
.jumbotron {
|
||||
padding: 2rem;
|
||||
padding: 2rem 1rem;
|
||||
margin-bottom: 2rem;
|
||||
color: inherit;
|
||||
background-color: #eceeef;
|
||||
@ -4176,7 +4179,8 @@ a.list-group-item.active > .badge,
|
||||
.jumbotron > hr {
|
||||
border-top-color: #d0d5d8;
|
||||
}
|
||||
.container .jumbotron {
|
||||
.container .jumbotron,
|
||||
.container-fluid .jumbotron {
|
||||
border-radius: .3rem;
|
||||
}
|
||||
.jumbotron .container {
|
||||
@ -4184,8 +4188,7 @@ a.list-group-item.active > .badge,
|
||||
}
|
||||
@media screen and (min-width: 48em) {
|
||||
.jumbotron {
|
||||
padding-top: 3.2rem;
|
||||
padding-bottom: 3.2rem;
|
||||
padding: 3.2rem 0;
|
||||
}
|
||||
.container .jumbotron {
|
||||
padding-right: 4rem;
|
||||
@ -4934,6 +4937,9 @@ button.close {
|
||||
display: none;
|
||||
max-width: 276px;
|
||||
padding: 1px;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
white-space: normal;
|
||||
background-color: #fff;
|
||||
@ -4960,8 +4966,6 @@ button.close {
|
||||
padding: 8px 14px;
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 18px;
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
border-radius: -.7rem -.7rem 0 0;
|
||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
77
dist/js/bootstrap.js
vendored
77
dist/js/bootstrap.js
vendored
@ -104,7 +104,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
if (e) e.preventDefault()
|
||||
|
||||
if (!$parent.length) {
|
||||
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
||||
$parent = $this.closest('.alert')
|
||||
}
|
||||
|
||||
$parent.trigger(e = $.Event('close.bs.alert'))
|
||||
@ -553,7 +553,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
||||
var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
|
||||
|
||||
if (actives && actives.length) {
|
||||
var hasData = actives.data('bs.collapse')
|
||||
@ -567,6 +567,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$element
|
||||
.removeClass('collapse')
|
||||
.addClass('collapsing')[dimension](0)
|
||||
.attr('aria-expanded', true)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
@ -602,15 +603,16 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$element
|
||||
.addClass('collapsing')
|
||||
.removeClass('collapse in')
|
||||
.attr('aria-expanded', false)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
var complete = function () {
|
||||
this.transitioning = 0
|
||||
this.$element
|
||||
.trigger('hidden.bs.collapse')
|
||||
.removeClass('collapsing')
|
||||
.addClass('collapse')
|
||||
.trigger('hidden.bs.collapse')
|
||||
}
|
||||
|
||||
if (!$.support.transition) return complete.call(this)
|
||||
@ -635,7 +637,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
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
|
||||
if (!data && options.toggle && option == 'show') options.toggle = false
|
||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
@ -672,8 +674,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this.toggleClass('collapsed', $target.hasClass('in'))
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false)
|
||||
var isCollapsed = $target.hasClass('in')
|
||||
$this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed)
|
||||
}
|
||||
|
||||
Plugin.call($target, option)
|
||||
@ -1012,7 +1015,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||
.appendTo(this.$body)
|
||||
|
||||
this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
|
||||
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
||||
if (e.target !== e.currentTarget) return
|
||||
this.options.backdrop == 'static'
|
||||
? this.$element[0].focus.call(this.$element[0])
|
||||
@ -1050,8 +1053,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
}
|
||||
|
||||
Modal.prototype.checkScrollbar = function () {
|
||||
if (document.body.clientWidth >= window.innerWidth) return
|
||||
this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
|
||||
this.scrollbarWidth = this.measureScrollbar()
|
||||
}
|
||||
|
||||
Modal.prototype.setScrollbar = function () {
|
||||
@ -1064,6 +1066,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
}
|
||||
|
||||
Modal.prototype.measureScrollbar = function () { // thx walsh
|
||||
if (document.body.clientWidth >= window.innerWidth) return 0
|
||||
var scrollDiv = document.createElement('div')
|
||||
scrollDiv.className = 'modal-scrollbar-measure'
|
||||
this.$body.append(scrollDiv)
|
||||
@ -1232,6 +1235,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var self = obj instanceof this.constructor ?
|
||||
obj : $(obj.currentTarget).data('bs.' + this.type)
|
||||
|
||||
if (self && self.$tip && self.$tip.is(':visible')) {
|
||||
self.hoverState = 'in'
|
||||
return
|
||||
}
|
||||
|
||||
if (!self) {
|
||||
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
||||
$(obj.currentTarget).data('bs.' + this.type, self)
|
||||
@ -1274,7 +1282,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
if (this.hasContent() && this.enabled) {
|
||||
this.$element.trigger(e)
|
||||
|
||||
var inDom = $.contains(document.documentElement, this.$element[0])
|
||||
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
|
||||
if (e.isDefaultPrevented() || !inDom) return
|
||||
var that = this
|
||||
|
||||
@ -1383,16 +1391,18 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
if (delta.left) offset.left += delta.left
|
||||
else offset.top += delta.top
|
||||
|
||||
var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
||||
var arrowPosition = delta.left ? 'left' : 'top'
|
||||
var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
|
||||
var isVertical = /top|bottom/.test(placement)
|
||||
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
||||
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
|
||||
|
||||
$tip.offset(offset)
|
||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
|
||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
||||
}
|
||||
|
||||
Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
|
||||
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
|
||||
Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
|
||||
this.arrow()
|
||||
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
||||
.css(isHorizontal ? 'top' : 'left', '')
|
||||
}
|
||||
|
||||
Tooltip.prototype.setContent = function () {
|
||||
@ -1403,16 +1413,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
$tip.removeClass('fade in top bottom left right')
|
||||
}
|
||||
|
||||
Tooltip.prototype.hide = function () {
|
||||
Tooltip.prototype.hide = function (callback) {
|
||||
var that = this
|
||||
var $tip = this.tip()
|
||||
var e = $.Event('hide.bs.' + this.type)
|
||||
|
||||
this.$element.removeAttr('aria-describedby')
|
||||
|
||||
function complete() {
|
||||
if (that.hoverState != 'in') $tip.detach()
|
||||
that.$element.trigger('hidden.bs.' + that.type)
|
||||
that.$element
|
||||
.removeAttr('aria-describedby')
|
||||
.trigger('hidden.bs.' + that.type)
|
||||
callback && callback()
|
||||
}
|
||||
|
||||
this.$element.trigger(e)
|
||||
@ -1450,7 +1461,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var isBody = el.tagName == 'BODY'
|
||||
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||
|
||||
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
|
||||
var elRect = el.getBoundingClientRect()
|
||||
if (elRect.width == null) {
|
||||
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
||||
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
||||
}
|
||||
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||
var outerDims = isSvg ? {} : {
|
||||
@ -1522,14 +1537,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
|
||||
}
|
||||
|
||||
Tooltip.prototype.validate = function () {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide()
|
||||
this.$element = null
|
||||
this.options = null
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.enable = function () {
|
||||
this.enabled = true
|
||||
}
|
||||
@ -1556,8 +1563,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
}
|
||||
|
||||
Tooltip.prototype.destroy = function () {
|
||||
var that = this
|
||||
clearTimeout(this.timeout)
|
||||
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
|
||||
this.hide(function () {
|
||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -1640,7 +1650,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var content = this.getContent()
|
||||
|
||||
$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
|
||||
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
|
||||
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
||||
](content)
|
||||
|
||||
@ -1773,6 +1783,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
return ($href
|
||||
&& $href.length
|
||||
&& $href.is(':visible')
|
||||
&& $el.is(':visible')
|
||||
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
@ -2162,8 +2173,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
|
||||
data.offset = data.offset || {}
|
||||
|
||||
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
||||
if (data.offsetTop) data.offset.top = data.offsetTop
|
||||
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
||||
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
||||
|
||||
Plugin.call($spy, data)
|
||||
})
|
||||
|
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -17,3 +17,7 @@
|
||||
- name: XhmikosR
|
||||
user: xhmikosr
|
||||
gravatar: e37759b1ea0125d4e97b1e00b5eed26f
|
||||
|
||||
- name: Heinrich Fenkart
|
||||
user: hnrch02
|
||||
gravatar: 0d53f5d3d3d28bd470f394d98f7ef48f
|
||||
|
@ -35,5 +35,5 @@
|
||||
|
||||
- name: Ukrainian
|
||||
code: uk
|
||||
description: Bootstrap ua Українською
|
||||
url: http://twbs.site-konstruktor.com.ua
|
||||
description: Bootstrap українською
|
||||
url: http://twbs.docs.org.ua
|
||||
|
@ -87,6 +87,18 @@
|
||||
<label for="input-@enable-gradients">@enable-gradients</label>
|
||||
<input id="input-@enable-gradients" type="text" value="true" data-var="@enable-gradients" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@enable-transitions">@enable-transitions</label>
|
||||
<input id="input-@enable-transitions" type="text" value="true" data-var="@enable-transitions" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@spacer">@spacer</label>
|
||||
<input id="input-@spacer" type="text" value="1rem" data-var="@spacer" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@border-width">@border-width</label>
|
||||
<input id="input-@border-width" type="text" value=".05rem" data-var="@border-width" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="typography">Typography</h2>
|
||||
<p>Font, line-height, and color for body text, headings, and more.</p>
|
||||
@ -191,7 +203,7 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@padding-base-horizontal">@padding-base-horizontal</label>
|
||||
<input id="input-@padding-base-horizontal" type="text" value="1rem" data-var="@padding-base-horizontal" class="form-control"/>
|
||||
<input id="input-@padding-base-horizontal" type="text" value=".75rem" data-var="@padding-base-horizontal" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@padding-large-vertical">@padding-large-vertical</label>
|
||||
@ -227,7 +239,7 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@border-radius-base">@border-radius-base</label>
|
||||
<input id="input-@border-radius-base" type="text" value=".2rem" data-var="@border-radius-base" class="form-control"/>
|
||||
<input id="input-@border-radius-base" type="text" value=".25rem" data-var="@border-radius-base" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@border-radius-large">@border-radius-large</label>
|
||||
@ -263,7 +275,7 @@
|
||||
<div class="row">
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@table-cell-padding">@table-cell-padding</label>
|
||||
<input id="input-@table-cell-padding" type="text" value=".6rem" data-var="@table-cell-padding" class="form-control"/>
|
||||
<input id="input-@table-cell-padding" type="text" value=".75rem" data-var="@table-cell-padding" class="form-control"/>
|
||||
<p class="help-block">Padding for <code><th></code>s and <code><td></code>s.</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
@ -292,7 +304,7 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@table-border-color">@table-border-color</label>
|
||||
<input id="input-@table-border-color" type="text" value="#ddd" data-var="@table-border-color" class="form-control"/>
|
||||
<input id="input-@table-border-color" type="text" value="@gray-lighter" data-var="@table-border-color" class="form-control"/>
|
||||
<p class="help-block">Border color for table and cell borders.</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -406,7 +418,17 @@
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-border-radius">@input-border-radius</label>
|
||||
<input id="input-@input-border-radius" type="text" value="@border-radius-base" data-var="@input-border-radius" class="form-control"/>
|
||||
<p class="help-block"><code><input></code> border radius</p>
|
||||
<p class="help-block">Default <code>.form-control</code> border radius</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-border-radius-large">@input-border-radius-large</label>
|
||||
<input id="input-@input-border-radius-large" type="text" value="@border-radius-large" data-var="@input-border-radius-large" class="form-control"/>
|
||||
<p class="help-block">Large <code>.form-control</code> border radius</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-border-radius-small">@input-border-radius-small</label>
|
||||
<input id="input-@input-border-radius-small" type="text" value="@border-radius-small" data-var="@input-border-radius-small" class="form-control"/>
|
||||
<p class="help-block">Small <code>.form-control</code> border radius</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-border-focus">@input-border-focus</label>
|
||||
@ -424,17 +446,17 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-height-base">@input-height-base</label>
|
||||
<input id="input-@input-height-base" type="text" value="((@font-size-base * @line-height-base) + (@padding-base-vertical * 2) + .2)" data-var="@input-height-base" class="form-control"/>
|
||||
<input id="input-@input-height-base" type="text" value="((@font-size-base * @line-height-base) + (@padding-base-vertical * 2) + (@border-width * 2))" data-var="@input-height-base" class="form-control"/>
|
||||
<p class="help-block">Default <code>.form-control</code> height</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-height-large">@input-height-large</label>
|
||||
<input id="input-@input-height-large" type="text" value="((@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + .2)" data-var="@input-height-large" class="form-control"/>
|
||||
<input id="input-@input-height-large" type="text" value="((@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + (@border-width * 2))" data-var="@input-height-large" class="form-control"/>
|
||||
<p class="help-block">Large <code>.form-control</code> height</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@input-height-small">@input-height-small</label>
|
||||
<input id="input-@input-height-small" type="text" value="((@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + .2)" data-var="@input-height-small" class="form-control"/>
|
||||
<input id="input-@input-height-small" type="text" value="((@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + (@border-width * 2))" data-var="@input-height-small" class="form-control"/>
|
||||
<p class="help-block">Small <code>.form-control</code> height</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
@ -678,7 +700,7 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@navbar-inverse-bg">@navbar-inverse-bg</label>
|
||||
<input id="input-@navbar-inverse-bg" type="text" value="#222" data-var="@navbar-inverse-bg" class="form-control"/>
|
||||
<input id="input-@navbar-inverse-bg" type="text" value="#373a3c" data-var="@navbar-inverse-bg" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@navbar-inverse-border">@navbar-inverse-border</label>
|
||||
@ -686,7 +708,7 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@navbar-inverse-link-color">@navbar-inverse-link-color</label>
|
||||
<input id="input-@navbar-inverse-link-color" type="text" value="@gray-light" data-var="@navbar-inverse-link-color" class="form-control"/>
|
||||
<input id="input-@navbar-inverse-link-color" type="text" value="lighten(@gray-light, 15%)" data-var="@navbar-inverse-link-color" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@navbar-inverse-link-hover-color">@navbar-inverse-link-hover-color</label>
|
||||
@ -743,7 +765,7 @@
|
||||
<div class="row">
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@nav-link-padding">@nav-link-padding</label>
|
||||
<input id="input-@nav-link-padding" type="text" value=".5em 1em" data-var="@nav-link-padding" class="form-control"/>
|
||||
<input id="input-@nav-link-padding" type="text" value=".6em 1em" data-var="@nav-link-padding" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@nav-link-hover-bg">@nav-link-hover-bg</label>
|
||||
@ -757,10 +779,6 @@
|
||||
<label for="input-@nav-disabled-link-hover-color">@nav-disabled-link-hover-color</label>
|
||||
<input id="input-@nav-disabled-link-hover-color" type="text" value="@gray-light" data-var="@nav-disabled-link-hover-color" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@nav-open-link-hover-color">@nav-open-link-hover-color</label>
|
||||
<input id="input-@nav-open-link-hover-color" type="text" value="#fff" data-var="@nav-open-link-hover-color" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="tabs">Tabs</h2>
|
||||
<div class="row">
|
||||
@ -897,7 +915,7 @@
|
||||
<div class="row">
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@jumbotron-padding">@jumbotron-padding</label>
|
||||
<input id="input-@jumbotron-padding" type="text" value="30px" data-var="@jumbotron-padding" class="form-control"/>
|
||||
<input id="input-@jumbotron-padding" type="text" value="2rem" data-var="@jumbotron-padding" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@jumbotron-color">@jumbotron-color</label>
|
||||
@ -911,10 +929,6 @@
|
||||
<label for="input-@jumbotron-heading-color">@jumbotron-heading-color</label>
|
||||
<input id="input-@jumbotron-heading-color" type="text" value="inherit" data-var="@jumbotron-heading-color" class="form-control"/>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@jumbotron-font-size">@jumbotron-font-size</label>
|
||||
<input id="input-@jumbotron-font-size" type="text" value="ceil((@font-size-base * 1.5))" data-var="@jumbotron-font-size" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="form-states-and-alerts">Form states and alerts</h2>
|
||||
<p>Define colors for form feedback states and, by default, alerts.</p>
|
||||
@ -1036,7 +1050,7 @@
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
<label for="input-@popover-arrow-color">@popover-arrow-color</label>
|
||||
<input id="input-@popover-arrow-color" type="text" value="#fff" data-var="@popover-arrow-color" class="form-control"/>
|
||||
<input id="input-@popover-arrow-color" type="text" value="@popover-bg" data-var="@popover-arrow-color" class="form-control"/>
|
||||
<p class="help-block">Popover arrow color</p>
|
||||
</div>
|
||||
<div class="bs-customizer-input">
|
||||
|
@ -4,7 +4,9 @@
|
||||
<div class="bs-docs-container">
|
||||
{% include social-buttons.html %}
|
||||
|
||||
<p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>. Maintained by the <a href="https://github.com/twbs?tab=members">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>. Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>.</p>
|
||||
<p>Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<ul class="bs-docs-footer-links muted">
|
||||
<li>Currently v{{ site.current_version }}</li>
|
||||
<li>·</li>
|
||||
@ -20,7 +22,7 @@
|
||||
<li>·</li>
|
||||
<li><a href="{{ site.blog }}">Blog</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ site.repo }}/issues?state=open">Issues</a></li>
|
||||
<li><a href="{{ site.repo }}/issues">Issues</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ site.repo }}/releases">Releases</a></li>
|
||||
</ul>
|
||||
|
45
docs/_includes/nav/customize.html
Normal file
45
docs/_includes/nav/customize.html
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
<!-- NOTE: DO NOT EDIT THE FOLLOWING SECTION DIRECTLY! It is autogenerated via the `build-customizer-html` Grunt task using the customizer-nav.jade template.-->
|
||||
<li><a href="#import">Import</a></li>
|
||||
<li><a href="#less">Less components</a></li>
|
||||
<li><a href="#plugins">jQuery plugins</a></li>
|
||||
<li><a href="#less-variables">Less variables</a>
|
||||
<ul class="nav">
|
||||
<li><a href="#colors">Colors</a></li>
|
||||
<li><a href="#scaffolding">Scaffolding</a></li>
|
||||
<li><a href="#global-settings">Global settings</a></li>
|
||||
<li><a href="#typography">Typography</a></li>
|
||||
<li><a href="#components">Components</a></li>
|
||||
<li><a href="#tables">Tables</a></li>
|
||||
<li><a href="#buttons">Buttons</a></li>
|
||||
<li><a href="#forms">Forms</a></li>
|
||||
<li><a href="#dropdowns">Dropdowns</a></li>
|
||||
<li><a href="#media-queries-breakpoints">Media queries breakpoints</a></li>
|
||||
<li><a href="#grid-system">Grid system</a></li>
|
||||
<li><a href="#container-sizes">Container sizes</a></li>
|
||||
<li><a href="#navbar">Navbar</a></li>
|
||||
<li><a href="#navs">Navs</a></li>
|
||||
<li><a href="#tabs">Tabs</a></li>
|
||||
<li><a href="#pills">Pills</a></li>
|
||||
<li><a href="#pagination">Pagination</a></li>
|
||||
<li><a href="#pager">Pager</a></li>
|
||||
<li><a href="#jumbotron">Jumbotron</a></li>
|
||||
<li><a href="#form-states-and-alerts">Form states and alerts</a></li>
|
||||
<li><a href="#tooltips">Tooltips</a></li>
|
||||
<li><a href="#popovers">Popovers</a></li>
|
||||
<li><a href="#labels">Labels</a></li>
|
||||
<li><a href="#modals">Modals</a></li>
|
||||
<li><a href="#alerts">Alerts</a></li>
|
||||
<li><a href="#progress-bars">Progress bars</a></li>
|
||||
<li><a href="#list-group">List group</a></li>
|
||||
<li><a href="#thumbnails">Thumbnails</a></li>
|
||||
<li><a href="#badges">Badges</a></li>
|
||||
<li><a href="#breadcrumbs">Breadcrumbs</a></li>
|
||||
<li><a href="#carousel">Carousel</a></li>
|
||||
<li><a href="#close">Close</a></li>
|
||||
<li><a href="#code">Code</a></li>
|
||||
<li><a href="#type">Type</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#download">Download</a></li>
|
||||
<!-- NOTE: DO NOT EDIT THE PRECEDING SECTION DIRECTLY! It is autogenerated via the `build-customizer-html` Grunt task using the customizer-nav.jade template.-->
|
2
docs/assets/css/docs.min.css
vendored
2
docs/assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
4
docs/assets/js/customize.min.js
vendored
4
docs/assets/js/customize.min.js
vendored
File diff suppressed because one or more lines are too long
4
docs/assets/js/raw-files.min.js
vendored
4
docs/assets/js/raw-files.min.js
vendored
File diff suppressed because one or more lines are too long
@ -73,6 +73,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
$.ajax({
|
||||
url: 'https://api.github.com/gists',
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=UTF-8',
|
||||
dataType: 'json',
|
||||
data: JSON.stringify(data)
|
||||
})
|
||||
|
@ -1073,6 +1073,14 @@ body {
|
||||
margin: 1.25rem;
|
||||
}
|
||||
|
||||
// Tooltips
|
||||
.bs-example-tooltip .tooltip {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 10px 20px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// Scrollspy demo on fixed height div
|
||||
.scrollspy-example {
|
||||
position: relative;
|
||||
@ -1269,6 +1277,35 @@ body {
|
||||
box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
|
||||
}
|
||||
|
||||
// Drag and drop
|
||||
.bs-dropzone {
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
color: #777;
|
||||
text-align: center;
|
||||
border: 2px dashed #eee;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.bs-dropzone h2 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.bs-dropzone .lead {
|
||||
margin-bottom: 10px;
|
||||
font-weight: normal;
|
||||
color: #333;
|
||||
}
|
||||
.bs-dropzone hr {
|
||||
width: 100px;
|
||||
}
|
||||
#import-manual-trigger {
|
||||
cursor: pointer;
|
||||
}
|
||||
.bs-dropzone p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Brand guidelines
|
||||
|
@ -18,6 +18,12 @@ We publicly list browser bugs that are impacting us here, in the hopes of expedi
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Internet Explorer 11</td>
|
||||
<td>When hovering over a <code><select></code> menu item, the cursor for the element underneath the menu is displayed</td>
|
||||
<td><a href="https://connect.microsoft.com/IE/feedbackdetail/view/963961">IE bug #963961</a></td>
|
||||
<td><a href="https://github.com/twbs/bootstrap/issues/14528">#14528</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Firefox</td>
|
||||
<td><code>.table-bordered</code> with an empty <code><tbody></code> is missing borders</td>
|
||||
@ -42,6 +48,18 @@ We publicly list browser bugs that are impacting us here, in the hopes of expedi
|
||||
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1048279">Mozilla bug #1048279</a></td>
|
||||
<td><a href="https://github.com/twbs/bootstrap/issues/14124">#14124</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Firefox</td>
|
||||
<td>If the disabled state of a form control is changed via JavaScript, the normal state doesn't return after refreshing the page.</td>
|
||||
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a></td>
|
||||
<td><a href="https://github.com/twbs/bootstrap/issues/793">#793</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Firefox</td>
|
||||
<td>Button elements with <code>width: 100%</code> become cropped in long tables.</td>
|
||||
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1060131">Mozilla bug #1060131</a></td>
|
||||
<td><a href="https://github.com/twbs/bootstrap/issues/14320">#14320</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chrome</td>
|
||||
<td>Weird button behavior with some number <code><input></code>s</td>
|
||||
|
@ -29,23 +29,6 @@ Built-in styles are included for placing badges in active states in pill navigat
|
||||
<a class="nav-link" href="#">Messages <span class="badge">3</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-stacked" role="tablist" style="max-width: 260px;">
|
||||
<li class="nav-item active" role="presentation">
|
||||
<a class="nav-link" href="#">
|
||||
<span class="badge pull-right">42</span>
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" href="#">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" href="#">
|
||||
<span class="badge pull-right">3</span>
|
||||
Messages
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endexample %}
|
||||
|
||||
### Buttons
|
||||
|
@ -86,7 +86,7 @@ Separate groups of related menu items with a divider.
|
||||
Add `.disabled` to a `<li>` in the dropdown to disable the link.
|
||||
|
||||
{% example html %}
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu3">
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="#">Regular link</a>
|
||||
</li>
|
||||
|
@ -316,12 +316,12 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Caveat about link functionality of `<a>`</h4>
|
||||
<p>Our styles use `pointer-events: none` to try to disable the link functionality of `<a class="btn btn-*">` buttons in this case, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
<p>Our styles use `pointer-events: none` to try to disable the link functionality of <code><a class="btn btn-*"></code> buttons in this case, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the `disabled` attribute on a `<fieldset>`. Use custom JavaScript to disable the fieldset in these browsers.</p>
|
||||
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
|
||||
</div>
|
||||
|
||||
## Readonly inputs
|
||||
@ -441,9 +441,9 @@ Set heights using classes like `.input-lg`, and set widths using grid column cla
|
||||
<input class="form-control" type="text" placeholder="Default input">
|
||||
<input class="form-control input-sm" type="text" placeholder=".input-sm">
|
||||
|
||||
<select class="form-control input-lg">...</select>
|
||||
<select class="form-control">...</select>
|
||||
<select class="form-control input-sm">...</select>
|
||||
<select class="form-control input-lg"></select>
|
||||
<select class="form-control"></select>
|
||||
<select class="form-control input-sm"></select>
|
||||
{% endexample %}
|
||||
|
||||
Quickly size labels and form controls within `.form-horizontal` by adding `.form-group-lg` or `.form-group-sm` to existing `.form-group`s.
|
||||
|
@ -3,11 +3,11 @@ layout: page
|
||||
title: Input group
|
||||
---
|
||||
|
||||
Extend form controls by adding text or buttons before, after, or on both sides of any text-based input. Use `.input-group` with an `.input-group-addon` to prepend or append elements to a single `.form-control`.
|
||||
Extend form controls by adding text or buttons before, after, or on both sides of any text-based `<input>`. Use `.input-group` with an `.input-group-addon` to prepend or append elements to a single `.form-control`.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Avoid using <code><select></code> elements here as they cannot be fully styled in WebKit browsers.</p>
|
||||
<h4>Textual <code><input></code>s only</h4>
|
||||
<p>Avoid using <code><textarea></code> elements here as their <code>rows</code> attribute will not be respected in some cases.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Tooltips & popovers in input groups require special setting</h4>
|
||||
|
@ -77,7 +77,7 @@ Proposal to replace the existing navbar with something simpler and more customiz
|
||||
<a class="nav-link" href="#">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form action="" class="form-inline pull-right">
|
||||
<form class="form-inline pull-right">
|
||||
<input class="form-control" type="text" placeholder="Search">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
</form>
|
||||
@ -101,7 +101,7 @@ Proposal to replace the existing navbar with something simpler and more customiz
|
||||
<a class="nav-link" href="#">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form action="" class="form-inline pull-right">
|
||||
<form class="form-inline pull-right">
|
||||
<input class="form-control" type="text" placeholder="Search">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
</form>
|
||||
|
@ -10,15 +10,17 @@ Provide pagination links for your site or app with the multi-page pagination com
|
||||
Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.
|
||||
|
||||
{% example html %}
|
||||
<ul class="pagination">
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li><a href="#">5</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li><a href="#">5</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endexample %}
|
||||
|
||||
### Disabled and active states
|
||||
@ -26,25 +28,29 @@ Simple pagination inspired by Rdio, great for apps and search results. The large
|
||||
Links are customizable for different circumstances. Use `.disabled` for unclickable links and `.active` to indicate the current page.
|
||||
|
||||
{% example html %}
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li><a href="#">5</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">4</a></li>
|
||||
<li><a href="#">5</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endexample %}
|
||||
|
||||
You can optionally swap out active or disabled anchors for `<span>` to remove click functionality while retaining intended styles.
|
||||
|
||||
{% highlight html %}
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><span>«</span></li>
|
||||
<li class="active"><span>1 <span class="sr-only">(current)</span></span></li>
|
||||
...
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><span>«</span></li>
|
||||
<li class="active"><span>1 <span class="sr-only">(current)</span></span></li>
|
||||
...
|
||||
</ul>
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
@ -53,23 +59,27 @@ You can optionally swap out active or disabled anchors for `<span>` to remove cl
|
||||
Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for additional sizes.
|
||||
|
||||
{% example html %}
|
||||
<ul class="pagination pagination-lg">
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pagination pagination-lg">
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endexample %}
|
||||
|
||||
{% example html %}
|
||||
<ul class="pagination pagination-sm">
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pagination pagination-sm">
|
||||
<li><a href="#">«</a></li>
|
||||
<li><a href="#">1</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><a href="#">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endexample %}
|
||||
|
||||
## Pager
|
||||
@ -81,10 +91,12 @@ Quick previous and next links for simple pagination implementations with light m
|
||||
By default, the pager centers links.
|
||||
|
||||
{% example html %}
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
<li><a href="#">Next</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
<li><a href="#">Next</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endexample %}
|
||||
|
||||
### Aligned links
|
||||
@ -92,10 +104,12 @@ By default, the pager centers links.
|
||||
Alternatively, you can align each link to the sides:
|
||||
|
||||
{% example html %}
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endexample %}
|
||||
|
||||
|
||||
@ -104,8 +118,10 @@ Alternatively, you can align each link to the sides:
|
||||
Pager links also use the `.disabled` class.
|
||||
|
||||
{% highlight html %}
|
||||
<ul class="pager">
|
||||
<li class="previous disabled"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous disabled"><a href="#">← Older</a></li>
|
||||
<li class="next"><a href="#">Newer →</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
|
@ -7,7 +7,6 @@ lead: Customize Bootstrap's components, Less variables, and jQuery plugins to ge
|
||||
|
||||
<!-- less.js isn't IE8-compatible and throws an exception during initialization, so our Blob compatibility check and error messaging code never get called in that case.
|
||||
So we use a conditional comment instead to inform folks about the lack of IE8 support.
|
||||
The alert covers up the entire customizer UI.
|
||||
-->
|
||||
<!--[if lt IE 9]>
|
||||
<style>
|
||||
@ -17,7 +16,7 @@ lead: Customize Bootstrap's components, Less variables, and jQuery plugins to ge
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="alert alert-danger bs-customizer-alert-ie">
|
||||
<div class="alert alert-danger">
|
||||
<strong>The Bootstrap Customizer does not support IE9 and below.</strong><br>
|
||||
Please take a second to <a href="http://browsehappy.com/">upgrade to a more modern browser</a>.
|
||||
</div>
|
||||
|
44
docs/dist/css/bootstrap.css
vendored
44
docs/dist/css/bootstrap.css
vendored
@ -205,8 +205,8 @@ th {
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
a[href^="javascript:"]:after,
|
||||
a[href^="#"]:after {
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
pre,
|
||||
@ -241,10 +241,6 @@ th {
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.btn > .caret,
|
||||
.dropup > .btn > .caret {
|
||||
border-top-color: #000 !important;
|
||||
@ -255,6 +251,10 @@ th {
|
||||
.table {
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.table-bordered th,
|
||||
.table-bordered td {
|
||||
border: 1px solid #ddd !important;
|
||||
@ -2933,8 +2933,8 @@ tbody.collapse.in {
|
||||
[data-toggle="buttons"] > .btn input[type="checkbox"],
|
||||
[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
}
|
||||
.input-group {
|
||||
position: relative;
|
||||
@ -3500,6 +3500,9 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
||||
.navbar-form .form-group {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.navbar-form .form-group:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@media (min-width: 48em) {
|
||||
.navbar-form {
|
||||
@ -3659,7 +3662,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
}
|
||||
.navbar-inverse .navbar-brand > a,
|
||||
.navbar-inverse .nav-pills > .nav-item > .nav-link {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-brand > a:hover,
|
||||
.navbar-inverse .nav-pills > .nav-item > .nav-link:hover,
|
||||
@ -3678,7 +3681,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
background-color: #1f2021;
|
||||
}
|
||||
.navbar-inverse .navbar-brand {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-brand:hover,
|
||||
.navbar-inverse .navbar-brand:focus {
|
||||
@ -3689,7 +3692,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
color: #a2a8ae;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > li > a:hover,
|
||||
.navbar-inverse .navbar-nav > li > a:focus {
|
||||
@ -3736,7 +3739,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
background-color: #1f2021;
|
||||
}
|
||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
|
||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
|
||||
@ -3757,13 +3760,13 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
}
|
||||
}
|
||||
.navbar-inverse .navbar-link {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .navbar-link:hover {
|
||||
color: #fff;
|
||||
}
|
||||
.navbar-inverse .btn-link {
|
||||
color: #818a91;
|
||||
color: #aab0b5;
|
||||
}
|
||||
.navbar-inverse .btn-link:hover,
|
||||
.navbar-inverse .btn-link:focus {
|
||||
@ -4164,7 +4167,7 @@ a.list-group-item.active > .badge,
|
||||
margin-left: 3px;
|
||||
}
|
||||
.jumbotron {
|
||||
padding: 2rem;
|
||||
padding: 2rem 1rem;
|
||||
margin-bottom: 2rem;
|
||||
color: inherit;
|
||||
background-color: #eceeef;
|
||||
@ -4176,7 +4179,8 @@ a.list-group-item.active > .badge,
|
||||
.jumbotron > hr {
|
||||
border-top-color: #d0d5d8;
|
||||
}
|
||||
.container .jumbotron {
|
||||
.container .jumbotron,
|
||||
.container-fluid .jumbotron {
|
||||
border-radius: .3rem;
|
||||
}
|
||||
.jumbotron .container {
|
||||
@ -4184,8 +4188,7 @@ a.list-group-item.active > .badge,
|
||||
}
|
||||
@media screen and (min-width: 48em) {
|
||||
.jumbotron {
|
||||
padding-top: 3.2rem;
|
||||
padding-bottom: 3.2rem;
|
||||
padding: 3.2rem 0;
|
||||
}
|
||||
.container .jumbotron {
|
||||
padding-right: 4rem;
|
||||
@ -4934,6 +4937,9 @@ button.close {
|
||||
display: none;
|
||||
max-width: 276px;
|
||||
padding: 1px;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
white-space: normal;
|
||||
background-color: #fff;
|
||||
@ -4960,8 +4966,6 @@ button.close {
|
||||
padding: 8px 14px;
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 18px;
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
border-radius: -.7rem -.7rem 0 0;
|
||||
|
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
77
docs/dist/js/bootstrap.js
vendored
77
docs/dist/js/bootstrap.js
vendored
@ -104,7 +104,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
if (e) e.preventDefault()
|
||||
|
||||
if (!$parent.length) {
|
||||
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
||||
$parent = $this.closest('.alert')
|
||||
}
|
||||
|
||||
$parent.trigger(e = $.Event('close.bs.alert'))
|
||||
@ -553,7 +553,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
||||
var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
|
||||
|
||||
if (actives && actives.length) {
|
||||
var hasData = actives.data('bs.collapse')
|
||||
@ -567,6 +567,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$element
|
||||
.removeClass('collapse')
|
||||
.addClass('collapsing')[dimension](0)
|
||||
.attr('aria-expanded', true)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
@ -602,15 +603,16 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$element
|
||||
.addClass('collapsing')
|
||||
.removeClass('collapse in')
|
||||
.attr('aria-expanded', false)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
var complete = function () {
|
||||
this.transitioning = 0
|
||||
this.$element
|
||||
.trigger('hidden.bs.collapse')
|
||||
.removeClass('collapsing')
|
||||
.addClass('collapse')
|
||||
.trigger('hidden.bs.collapse')
|
||||
}
|
||||
|
||||
if (!$.support.transition) return complete.call(this)
|
||||
@ -635,7 +637,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
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
|
||||
if (!data && options.toggle && option == 'show') options.toggle = false
|
||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
@ -672,8 +674,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this.toggleClass('collapsed', $target.hasClass('in'))
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false)
|
||||
var isCollapsed = $target.hasClass('in')
|
||||
$this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed)
|
||||
}
|
||||
|
||||
Plugin.call($target, option)
|
||||
@ -1012,7 +1015,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||
.appendTo(this.$body)
|
||||
|
||||
this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
|
||||
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
||||
if (e.target !== e.currentTarget) return
|
||||
this.options.backdrop == 'static'
|
||||
? this.$element[0].focus.call(this.$element[0])
|
||||
@ -1050,8 +1053,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
}
|
||||
|
||||
Modal.prototype.checkScrollbar = function () {
|
||||
if (document.body.clientWidth >= window.innerWidth) return
|
||||
this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
|
||||
this.scrollbarWidth = this.measureScrollbar()
|
||||
}
|
||||
|
||||
Modal.prototype.setScrollbar = function () {
|
||||
@ -1064,6 +1066,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
}
|
||||
|
||||
Modal.prototype.measureScrollbar = function () { // thx walsh
|
||||
if (document.body.clientWidth >= window.innerWidth) return 0
|
||||
var scrollDiv = document.createElement('div')
|
||||
scrollDiv.className = 'modal-scrollbar-measure'
|
||||
this.$body.append(scrollDiv)
|
||||
@ -1232,6 +1235,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var self = obj instanceof this.constructor ?
|
||||
obj : $(obj.currentTarget).data('bs.' + this.type)
|
||||
|
||||
if (self && self.$tip && self.$tip.is(':visible')) {
|
||||
self.hoverState = 'in'
|
||||
return
|
||||
}
|
||||
|
||||
if (!self) {
|
||||
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
||||
$(obj.currentTarget).data('bs.' + this.type, self)
|
||||
@ -1274,7 +1282,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
if (this.hasContent() && this.enabled) {
|
||||
this.$element.trigger(e)
|
||||
|
||||
var inDom = $.contains(document.documentElement, this.$element[0])
|
||||
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
|
||||
if (e.isDefaultPrevented() || !inDom) return
|
||||
var that = this
|
||||
|
||||
@ -1383,16 +1391,18 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
if (delta.left) offset.left += delta.left
|
||||
else offset.top += delta.top
|
||||
|
||||
var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
||||
var arrowPosition = delta.left ? 'left' : 'top'
|
||||
var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
|
||||
var isVertical = /top|bottom/.test(placement)
|
||||
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
||||
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
|
||||
|
||||
$tip.offset(offset)
|
||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
|
||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
||||
}
|
||||
|
||||
Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
|
||||
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
|
||||
Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
|
||||
this.arrow()
|
||||
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
||||
.css(isHorizontal ? 'top' : 'left', '')
|
||||
}
|
||||
|
||||
Tooltip.prototype.setContent = function () {
|
||||
@ -1403,16 +1413,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
$tip.removeClass('fade in top bottom left right')
|
||||
}
|
||||
|
||||
Tooltip.prototype.hide = function () {
|
||||
Tooltip.prototype.hide = function (callback) {
|
||||
var that = this
|
||||
var $tip = this.tip()
|
||||
var e = $.Event('hide.bs.' + this.type)
|
||||
|
||||
this.$element.removeAttr('aria-describedby')
|
||||
|
||||
function complete() {
|
||||
if (that.hoverState != 'in') $tip.detach()
|
||||
that.$element.trigger('hidden.bs.' + that.type)
|
||||
that.$element
|
||||
.removeAttr('aria-describedby')
|
||||
.trigger('hidden.bs.' + that.type)
|
||||
callback && callback()
|
||||
}
|
||||
|
||||
this.$element.trigger(e)
|
||||
@ -1450,7 +1461,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var isBody = el.tagName == 'BODY'
|
||||
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||
|
||||
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
|
||||
var elRect = el.getBoundingClientRect()
|
||||
if (elRect.width == null) {
|
||||
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
||||
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
||||
}
|
||||
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||
var outerDims = isSvg ? {} : {
|
||||
@ -1522,14 +1537,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
|
||||
}
|
||||
|
||||
Tooltip.prototype.validate = function () {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide()
|
||||
this.$element = null
|
||||
this.options = null
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.enable = function () {
|
||||
this.enabled = true
|
||||
}
|
||||
@ -1556,8 +1563,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
}
|
||||
|
||||
Tooltip.prototype.destroy = function () {
|
||||
var that = this
|
||||
clearTimeout(this.timeout)
|
||||
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
|
||||
this.hide(function () {
|
||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -1640,7 +1650,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
var content = this.getContent()
|
||||
|
||||
$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
|
||||
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
|
||||
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
||||
](content)
|
||||
|
||||
@ -1773,6 +1783,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
return ($href
|
||||
&& $href.length
|
||||
&& $href.is(':visible')
|
||||
&& $el.is(':visible')
|
||||
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
@ -2162,8 +2173,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
||||
|
||||
data.offset = data.offset || {}
|
||||
|
||||
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
||||
if (data.offsetTop) data.offset.top = data.offsetTop
|
||||
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
||||
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
||||
|
||||
Plugin.call($spy, data)
|
||||
})
|
||||
|
4
docs/dist/js/bootstrap.min.js
vendored
4
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -104,10 +104,12 @@
|
||||
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div><!-- /.blog-post -->
|
||||
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
<li><a href="#">Next</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
<li><a href="#">Next</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</div><!-- /.blog-main -->
|
||||
|
||||
|
@ -25,10 +25,10 @@
|
||||
<div class="navbar-wrapper">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -36,7 +36,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -56,7 +56,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -33,7 +33,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#">Dashboard</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
@ -45,7 +45,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -33,7 +33,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<form class="navbar-form navbar-right" role="form">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="Email" class="form-control">
|
||||
@ -45,7 +45,7 @@
|
||||
</form>
|
||||
</div><!--/.navbar-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main jumbotron for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
|
@ -23,10 +23,10 @@
|
||||
<body>
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -34,7 +34,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -59,7 +59,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
@ -23,10 +23,10 @@
|
||||
<body>
|
||||
|
||||
<!-- Static navbar -->
|
||||
<div class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -34,7 +34,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -59,7 +59,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
@ -25,10 +25,10 @@
|
||||
<div class="container">
|
||||
|
||||
<!-- Static navbar -->
|
||||
<div class="navbar navbar-default" role="navigation">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -36,7 +36,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
@ -61,7 +61,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container-fluid -->
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main component for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
|
@ -25,10 +25,10 @@
|
||||
<body>
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -36,7 +36,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -61,7 +61,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top navbar-inverse" role="navigation">
|
||||
<nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -32,7 +32,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -40,7 +40,7 @@
|
||||
</ul>
|
||||
</div><!-- /.nav-collapse -->
|
||||
</div><!-- /.container -->
|
||||
</div><!-- /.navbar -->
|
||||
</nav><!-- /.navbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
@ -55,32 +55,32 @@
|
||||
<p>This is an example to show the potential of an offcanvas layout pattern in Bootstrap. Try some responsive-range viewport sizes to see it in action.</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-6 col-lg-4">
|
||||
<div class="col-xs-6 col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!--/span-->
|
||||
<div class="col-6 col-sm-6 col-lg-4">
|
||||
<div class="col-xs-6 col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!--/span-->
|
||||
<div class="col-6 col-sm-6 col-lg-4">
|
||||
<div class="col-xs-6 col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!--/span-->
|
||||
<div class="col-6 col-sm-6 col-lg-4">
|
||||
<div class="col-xs-6 col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!--/span-->
|
||||
<div class="col-6 col-sm-6 col-lg-4">
|
||||
<div class="col-xs-6 col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!--/span-->
|
||||
<div class="col-6 col-sm-6 col-lg-4">
|
||||
<div class="col-xs-6 col-lg-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -33,7 +33,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -41,7 +41,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
@ -23,10 +23,10 @@
|
||||
<body>
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -34,7 +34,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -54,7 +54,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
|
@ -25,10 +25,10 @@
|
||||
<body role="document">
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@ -36,7 +36,7 @@
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Bootstrap theme</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
@ -56,7 +56,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container theme-showcase" role="main">
|
||||
|
||||
@ -371,7 +371,7 @@
|
||||
<h1>Navbars</h1>
|
||||
</div>
|
||||
|
||||
<div class="navbar navbar-default">
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
@ -402,9 +402,9 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="navbar navbar-inverse">
|
||||
<nav class="navbar navbar-inverse">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
@ -435,7 +435,7 @@
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
@ -29,6 +29,9 @@ Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`
|
||||
#### Tests - `grunt test`
|
||||
Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).
|
||||
|
||||
#### Tests and assets - `grunt docs`
|
||||
Compiles and tests CSS, JavaScript, and more for running the local documentation via `jekyll serve`.
|
||||
|
||||
#### Watch - `grunt watch`
|
||||
This is a convenience method for watching just Less files and automatically building them whenever you save.
|
||||
|
||||
|
@ -213,3 +213,11 @@ $(function () {
|
||||
{% endhighlight %}
|
||||
|
||||
Want to see an example? [Check out this JS Bin demo.](http://jsbin.com/OyaqoDO/2)
|
||||
|
||||
### Validators
|
||||
|
||||
In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement.
|
||||
|
||||
These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.
|
||||
|
||||
Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of [X-UA-Compatible `<meta>` tags](#ie-compatibility-modes) to avoid Internet Explorer issues and our inclusion of a workaround for [a certain Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072).
|
||||
|
@ -39,7 +39,7 @@ $(".alert").alert()
|
||||
|
||||
### Markup
|
||||
|
||||
Just add `data-dismiss="alert"` to your close button to automatically give an alert close functionality.
|
||||
Just add `data-dismiss="alert"` to your close button to automatically give an alert close functionality. Closing an alert removes it from the DOM.
|
||||
|
||||
{% highlight html %}
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
@ -48,7 +48,7 @@ Just add `data-dismiss="alert"` to your close button to automatically give an al
|
||||
</button>
|
||||
{% endhighlight %}
|
||||
|
||||
To have your alerts use animation when closing, make sure they have the `.fade` and `.in` class already applied to them.
|
||||
To have your alerts use animation when closing, make sure they have the `.fade` and `.in` classes already applied to them.
|
||||
|
||||
### Methods
|
||||
|
||||
@ -58,13 +58,13 @@ Makes an alert listen for click events on descendant elements which have the `da
|
||||
|
||||
#### $().alert('close')
|
||||
|
||||
Closes an alert.
|
||||
Closes an alert by removing it from the DOM. If the `.fade` and `.in` classes are present on the element, the alert will fade out before it is removed.
|
||||
|
||||
{% highlight js %}$(".alert").alert('close'){% endhighlight %}
|
||||
|
||||
### Events
|
||||
|
||||
Bootstrap's alert class exposes a few events for hooking into alert functionality.
|
||||
Bootstrap's alert plugin exposes a few events for hooking into alert functionality.
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
|
@ -3,111 +3,88 @@ layout: page
|
||||
title: Buttons
|
||||
---
|
||||
|
||||
|
||||
Do more with buttons. Control button states or create groups of buttons for more components like toolbars.
|
||||
|
||||
## Uses
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
|
||||
</div>
|
||||
|
||||
#### Stateful
|
||||
## Stateful
|
||||
|
||||
Add `data-loading-text="Loading..."` to use a loading state on a button.
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Use whichever state you like!</h4>
|
||||
<p>For the sake of this demonstration, we are using <code>data-loading-text</code> and <code>$().button('loading')</code>, but that's not the only state you can use. <a href="#buttons-methods">See more on this below in the <code>$().button(string)</code> documentation</a>.</p>
|
||||
</div>
|
||||
|
||||
{% example html %}
|
||||
<button type="button" id="loading-example-btn" data-loading-text="Loading..." class="btn btn-primary">
|
||||
<button type="button" id="myButton" data-loading-text="Loading..." class="btn btn-primary" autocomplete="off">
|
||||
Loading state
|
||||
</button>
|
||||
<script>
|
||||
$('#loading-example-btn').click(function () {
|
||||
var btn = $(this)
|
||||
btn.button('loading')
|
||||
$.ajax(...).always(function () {
|
||||
btn.button('reset')
|
||||
});
|
||||
});
|
||||
$('#myButton').on('click', function () {
|
||||
var $btn = $(this).button('loading')
|
||||
// business logic...
|
||||
$btn.button('reset')
|
||||
})
|
||||
</script>
|
||||
{% endexample %}
|
||||
|
||||
#### Single toggle
|
||||
### Single toggle
|
||||
|
||||
Add `data-toggle="button"` to activate toggling on a single button.
|
||||
|
||||
{% example html %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="button">
|
||||
<button type="button" class="btn btn-primary" data-toggle="button" autocomplete="off">
|
||||
Single toggle
|
||||
</button>
|
||||
{% endexample %}
|
||||
|
||||
#### Checkbox
|
||||
## Checkbox and radio
|
||||
|
||||
Add `data-toggle="buttons"` to a group of checkboxes for checkbox style toggling on btn-group.
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Pre-checked options need <code>.active</code></h4>
|
||||
<p>For pre-checked options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Visual checked state only updated on click</h4>
|
||||
<p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code><input type="reset"></code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
|
||||
{% example html %}
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="checkbox" autocomplete="off" checked> Option 1 (pre-checked)
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="checkbox" autocomplete="off"> Option 2
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="checkbox" autocomplete="off"> Option 3
|
||||
</label>
|
||||
</div>
|
||||
{% endexample %}
|
||||
|
||||
#### Radio
|
||||
|
||||
Add `data-toggle="buttons"` to a group of radio inputs for radio style toggling on btn-group.
|
||||
Add `data-toggle="buttons"` to a `.btn-group` containing checkbox or radio inputs to enable toggling in their respective styles.
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Preselected options need <code>.active</code></h4>
|
||||
<p>For preselected options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Visual checked state only updated on click</h4>
|
||||
<p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code><input type="reset"></code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{% example html %}
|
||||
<div class="bs-example">
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked)
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="checkbox" autocomplete="off"> Checkbox 2
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="checkbox" autocomplete="off"> Checkbox 3
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{% endexample %}
|
||||
|
||||
{% example html %}
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="radio" name="options" id="option1" autocomplete="off" checked> Option 1 (preselected)
|
||||
<input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected)
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" name="options" id="option2" autocomplete="off"> Option 2
|
||||
<input type="radio" name="options" id="option2" autocomplete="off"> Radio 2
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" name="options" id="option3" autocomplete="off"> Option 3
|
||||
<input type="radio" name="options" id="option3" autocomplete="off"> Radio 3
|
||||
</label>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Enable buttons via JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
$('.btn').button()
|
||||
{% endhighlight %}
|
||||
|
||||
### Markup
|
||||
|
||||
Data attributes are integral to the button plugin. Check out the example code below for the various markup types.
|
||||
|
||||
### Options
|
||||
|
||||
*None.*
|
||||
{% endexample %}
|
||||
|
||||
### Methods
|
||||
|
||||
@ -115,48 +92,21 @@ Data attributes are integral to the button plugin. Check out the example code be
|
||||
|
||||
Toggles push state. Gives the button the appearance that it has been activated.
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<h4>Auto toggling</h4>
|
||||
<p>You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="button">...</button>
|
||||
{% endhighlight %}
|
||||
|
||||
#### $().button('loading')</h4>
|
||||
|
||||
Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute `data-loading-text`.
|
||||
|
||||
{% highlight html %}
|
||||
<button id="loading-example-btn" type="button" class="btn btn-primary" data-loading-text="loading stuff...">...</button>
|
||||
<script>
|
||||
$('#loading-example-btn').click(function () {
|
||||
var btn = $(this)
|
||||
btn.button('loading')
|
||||
$.ajax(...).always(function () {
|
||||
btn.button('reset')
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
|
||||
</div>
|
||||
|
||||
#### $().button('reset')
|
||||
|
||||
Resets button state - swaps text to original text.
|
||||
Resets button state—swaps text to original text.
|
||||
|
||||
#### $().button(string)
|
||||
|
||||
Resets button state - swaps text to any data defined text state.
|
||||
Swaps text to any data defined text state.
|
||||
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-primary" data-complete-text="finished!" >...</button>
|
||||
<button type="button" id="myStateButton" data-complete-text="finished!" class="btn btn-primary" autocomplete="off">
|
||||
...
|
||||
</button>
|
||||
<script>
|
||||
$('.btn').button('complete')
|
||||
$('#myStateButton').on('click', function () {
|
||||
$(this).button('complete') // button text will be "finished!"
|
||||
})
|
||||
</script>
|
||||
{% endhighlight %}
|
||||
|
@ -3,9 +3,9 @@ layout: page
|
||||
title: Carousel
|
||||
---
|
||||
|
||||
## Example
|
||||
A slideshow component for cycling through elements—images or slides of text—like a carousel. **Nested carousels are not supported.**
|
||||
|
||||
The slideshow below shows a generic plugin and component for cycling through elements like a carousel.
|
||||
## Example
|
||||
|
||||
{% example html %}
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
|
||||
|
@ -17,42 +17,42 @@ Using the collapse plugin, we built a simple accordion by extending the panel co
|
||||
{% example html %}
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading" role="tab" id="headingOne">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
Collapsible Group Item #1
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel">
|
||||
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
|
||||
<div class="panel-body">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading" role="tab" id="headingTwo">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
|
||||
Collapsible Group Item #2
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel">
|
||||
<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
|
||||
<div class="panel-body">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading" role="tab" id="headingThree">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
|
||||
Collapsible Group Item #3
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel">
|
||||
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
|
||||
<div class="panel-body">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
|
||||
</div>
|
||||
@ -63,6 +63,12 @@ Using the collapse plugin, we built a simple accordion by extending the panel co
|
||||
|
||||
You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Make expand/collapse controls accessible</h4>
|
||||
<p>Be sure to add <code>aria-expanded</code> to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of <code>aria-expanded="false"</code>. If you've set the collapsible element to be open by default using the <code>in</code> class, set <code>aria-expanded="true"</code> on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.</p>
|
||||
<p>Additionally, if your control element is targetting a single collapsible element – i.e. the <code>data-target</code> attribute is pointing to an <code>id</code> selector – you may add an additional <code>aria-controls</code> attribute to the control element, containing the <code>id</code> of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.</p>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
|
||||
simple collapsible
|
||||
@ -84,7 +90,7 @@ These classes can be found in `component-animations.less`.
|
||||
|
||||
### Via data attributes
|
||||
|
||||
Just add `data-toggle="collapse"` and a `data-target` to element to automatically assign control of a collapsible element. The `data-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `in`.
|
||||
Just add `data-toggle="collapse"` and a `data-target` to the element to automatically assign control of a collapsible element. The `data-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `in`.
|
||||
|
||||
To add accordion-like group management to a collapsible control, add the data attribute `data-parent="#selector"`. Refer to the demo to see this in action.
|
||||
|
||||
@ -115,7 +121,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
<td>parent</td>
|
||||
<td>selector</td>
|
||||
<td>false</td>
|
||||
<td>If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this dependent on the <code>panel</code> class)</td>
|
||||
<td>If a selector is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the <code>panel</code> class)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>toggle</td>
|
||||
|
@ -107,14 +107,14 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
|
||||
</div>
|
||||
|
||||
<div class="bs-example" style="padding-bottom: 24px;">
|
||||
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
|
||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
|
||||
Launch demo modal
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
<!-- Button trigger modal -->
|
||||
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
|
||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
|
||||
Launch demo modal
|
||||
</button>
|
||||
|
||||
@ -154,8 +154,8 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
|
||||
Modals have two optional sizes, available via modifier classes to be placed on a `.modal-dialog`.
|
||||
|
||||
<div class="bs-example">
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
@ -171,7 +171,7 @@ Modals have two optional sizes, available via modifier classes to be placed on a
|
||||
</div>
|
||||
|
||||
<!-- Small modal -->
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
|
||||
|
||||
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
|
@ -170,7 +170,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
<td>string | false</td>
|
||||
<td>false</td>
|
||||
<td>
|
||||
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
|
||||
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -179,7 +179,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
<td>''</td>
|
||||
<td>
|
||||
<p>Default content value if <code>data-content</code> attribute isn't present.</p>
|
||||
<p>If a function is given, it will be called with its <code>this</code> reference set to, which is the element that the popover is attached to.</p>
|
||||
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -218,11 +218,11 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
<td>string</td>
|
||||
<td><code>'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'</code></td>
|
||||
<td>
|
||||
<p>Base HTML to use when creating the popover.</p>
|
||||
<p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
|
||||
<p>The popover's <code>content</code> will be injected into the <code>.popover-content</code>.</p>
|
||||
<p><code>.arrow</code> will become the popover's arrow.</p>
|
||||
<p>The outermost wrapper element should have the <code>.popover</code> class.</p>
|
||||
<p>Base HTML to use when creating the popover.</p>
|
||||
<p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
|
||||
<p>The popover's <code>content</code> will be injected into the <code>.popover-content</code>.</p>
|
||||
<p><code>.arrow</code> will become the popover's arrow.</p>
|
||||
<p>The outermost wrapper element should have the <code>.popover</code> class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -241,13 +241,13 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
<td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>viewport</td>
|
||||
<td>string | object</td>
|
||||
<td>{ selector: 'body', padding: 0 }</td>
|
||||
<td>
|
||||
<p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
<td>viewport</td>
|
||||
<td>string | object</td>
|
||||
<td>{ selector: 'body', padding: 0 }</td>
|
||||
<td>
|
||||
<p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -293,27 +293,27 @@ Hides and destroys an element's popover.
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
<th>Description</th>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>show.bs.popover</td>
|
||||
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shown.bs.popover</td>
|
||||
<td>This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide.bs.popover</td>
|
||||
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hidden.bs.popover</td>
|
||||
<td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>show.bs.popover</td>
|
||||
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shown.bs.popover</td>
|
||||
<td>This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide.bs.popover</td>
|
||||
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hidden.bs.popover</td>
|
||||
<td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -16,9 +16,40 @@ Hover over the links below to see tooltips:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
### Directions
|
||||
### Static demo
|
||||
|
||||
Available in four directions
|
||||
Four options are available: top, right, bottom, and left aligned.
|
||||
|
||||
<div class="bs-example bs-example-tooltip">
|
||||
<div class="tooltip left" role="tooltip">
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner">
|
||||
Tooltip on the left
|
||||
</div>
|
||||
</div>
|
||||
<div class="tooltip top" role="tooltip">
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner">
|
||||
Tooltip on the top
|
||||
</div>
|
||||
</div>
|
||||
<div class="tooltip bottom" role="tooltip">
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner">
|
||||
Tooltip on the bottom
|
||||
</div>
|
||||
</div>
|
||||
<div class="tooltip right" role="tooltip">
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner">
|
||||
Tooltip on the right
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
### Interactive demo
|
||||
|
||||
Hover over the buttons below to see their tooltips.
|
||||
|
||||
<div class="bs-example tooltip-demo">
|
||||
<div class="bs-example-tooltips">
|
||||
@ -100,12 +131,12 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">Name</th>
|
||||
<th style="width: 100px;">Type</th>
|
||||
<th style="width: 50px;">Default</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 100px;">Name</th>
|
||||
<th style="width: 100px;">Type</th>
|
||||
<th style="width: 50px;">Default</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -231,28 +262,28 @@ Hides and destroys an element's tooltip.
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>show.bs.tooltip</td>
|
||||
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shown.bs.tooltip</td>
|
||||
<td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide.bs.tooltip</td>
|
||||
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hidden.bs.tooltip</td>
|
||||
<td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>show.bs.tooltip</td>
|
||||
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shown.bs.tooltip</td>
|
||||
<td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide.bs.tooltip</td>
|
||||
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hidden.bs.tooltip</td>
|
||||
<td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -152,8 +152,8 @@
|
||||
|
||||
data.offset = data.offset || {}
|
||||
|
||||
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
||||
if (data.offsetTop) data.offset.top = data.offsetTop
|
||||
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
||||
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
||||
|
||||
Plugin.call($spy, data)
|
||||
})
|
||||
|
@ -36,7 +36,7 @@
|
||||
if (e) e.preventDefault()
|
||||
|
||||
if (!$parent.length) {
|
||||
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
||||
$parent = $this.closest('.alert')
|
||||
}
|
||||
|
||||
$parent.trigger(e = $.Event('close.bs.alert'))
|
||||
|
@ -42,7 +42,7 @@
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
||||
var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
|
||||
|
||||
if (actives && actives.length) {
|
||||
var hasData = actives.data('bs.collapse')
|
||||
@ -56,6 +56,7 @@
|
||||
this.$element
|
||||
.removeClass('collapse')
|
||||
.addClass('collapsing')[dimension](0)
|
||||
.attr('aria-expanded', true)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
@ -91,15 +92,16 @@
|
||||
this.$element
|
||||
.addClass('collapsing')
|
||||
.removeClass('collapse in')
|
||||
.attr('aria-expanded', false)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
var complete = function () {
|
||||
this.transitioning = 0
|
||||
this.$element
|
||||
.trigger('hidden.bs.collapse')
|
||||
.removeClass('collapsing')
|
||||
.addClass('collapse')
|
||||
.trigger('hidden.bs.collapse')
|
||||
}
|
||||
|
||||
if (!$.support.transition) return complete.call(this)
|
||||
@ -124,7 +126,7 @@
|
||||
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
|
||||
if (!data && options.toggle && option == 'show') options.toggle = false
|
||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
@ -161,8 +163,9 @@
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this.toggleClass('collapsed', $target.hasClass('in'))
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false)
|
||||
var isCollapsed = $target.hasClass('in')
|
||||
$this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed)
|
||||
}
|
||||
|
||||
Plugin.call($target, option)
|
||||
|
@ -169,7 +169,7 @@
|
||||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||
.appendTo(this.$body)
|
||||
|
||||
this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
|
||||
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
||||
if (e.target !== e.currentTarget) return
|
||||
this.options.backdrop == 'static'
|
||||
? this.$element[0].focus.call(this.$element[0])
|
||||
@ -207,8 +207,7 @@
|
||||
}
|
||||
|
||||
Modal.prototype.checkScrollbar = function () {
|
||||
if (document.body.clientWidth >= window.innerWidth) return
|
||||
this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
|
||||
this.scrollbarWidth = this.measureScrollbar()
|
||||
}
|
||||
|
||||
Modal.prototype.setScrollbar = function () {
|
||||
@ -221,6 +220,7 @@
|
||||
}
|
||||
|
||||
Modal.prototype.measureScrollbar = function () { // thx walsh
|
||||
if (document.body.clientWidth >= window.innerWidth) return 0
|
||||
var scrollDiv = document.createElement('div')
|
||||
scrollDiv.className = 'modal-scrollbar-measure'
|
||||
this.$body.append(scrollDiv)
|
||||
|
@ -46,7 +46,7 @@
|
||||
var content = this.getContent()
|
||||
|
||||
$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
|
||||
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
|
||||
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
||||
](content)
|
||||
|
||||
|
@ -65,6 +65,7 @@
|
||||
return ($href
|
||||
&& $href.length
|
||||
&& $href.is(':visible')
|
||||
&& $el.is(':visible')
|
||||
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
|
@ -30,7 +30,7 @@ $(function () {
|
||||
})
|
||||
|
||||
test('should fade element out on clicking .close', function () {
|
||||
var alertHTML = '<div class="alert-message warning fade in">'
|
||||
var alertHTML = '<div class="alert alert-danger fade in">'
|
||||
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
|
||||
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
|
||||
+ '</div>'
|
||||
@ -42,17 +42,17 @@ $(function () {
|
||||
})
|
||||
|
||||
test('should remove element when clicking .close', function () {
|
||||
var alertHTML = '<div class="alert-message warning fade in">'
|
||||
var alertHTML = '<div class="alert alert-danger fade in">'
|
||||
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
|
||||
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
|
||||
+ '</div>'
|
||||
var $alert = $(alertHTML).appendTo('#qunit-fixture').bootstrapAlert()
|
||||
|
||||
notEqual($('#qunit-fixture').find('.alert-message').length, 0, 'element added to dom')
|
||||
notEqual($('#qunit-fixture').find('.alert').length, 0, 'element added to dom')
|
||||
|
||||
$alert.find('.close').click()
|
||||
|
||||
equal($('#qunit-fixture').find('.alert-message').length, 0, 'element removed from dom')
|
||||
equal($('#qunit-fixture').find('.alert').length, 0, 'element removed from dom')
|
||||
})
|
||||
|
||||
test('should not fire closed when close is prevented', function () {
|
||||
|
@ -75,7 +75,7 @@ $(function () {
|
||||
test('should remove "collapsed" class from target when collapse is shown', function () {
|
||||
stop()
|
||||
|
||||
var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture')
|
||||
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture')
|
||||
|
||||
$('<div id="test1"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
@ -102,6 +102,38 @@ $(function () {
|
||||
$target.click()
|
||||
})
|
||||
|
||||
test('should not close a collapse when initialized with "show" if already shown', function () {
|
||||
stop()
|
||||
|
||||
expect(0)
|
||||
|
||||
var $test = $('<div id="test1" class="in"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.on('hide.bs.collapse', function () {
|
||||
ok(false)
|
||||
})
|
||||
|
||||
$test.bootstrapCollapse('show')
|
||||
|
||||
setTimeout(start, 0)
|
||||
})
|
||||
|
||||
test('should open a collapse when initialized with "show" if not already shown', function () {
|
||||
stop()
|
||||
|
||||
expect(1)
|
||||
|
||||
var $test = $('<div id="test1" />')
|
||||
.appendTo('#qunit-fixture')
|
||||
.on('show.bs.collapse', function () {
|
||||
ok(true)
|
||||
})
|
||||
|
||||
$test.bootstrapCollapse('show')
|
||||
|
||||
setTimeout(start, 0)
|
||||
})
|
||||
|
||||
test('should remove "collapsed" class from active accordion target', function () {
|
||||
stop()
|
||||
|
||||
@ -168,4 +200,67 @@ $(function () {
|
||||
$target3.click()
|
||||
})
|
||||
|
||||
test('should set aria-expanded="true" on target when collapse is shown', function () {
|
||||
stop()
|
||||
|
||||
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1" aria-expanded="false"/>').appendTo('#qunit-fixture')
|
||||
|
||||
$('<div id="test1"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.on('show.bs.collapse', function () {
|
||||
equal($target.attr('aria-expanded'), 'true', 'aria-expanded on target is "true"')
|
||||
start()
|
||||
})
|
||||
|
||||
$target.click()
|
||||
})
|
||||
|
||||
test('should set aria-expanded="false" on target when collapse is hidden', function () {
|
||||
stop()
|
||||
|
||||
var $target = $('<a data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture')
|
||||
|
||||
$('<div id="test1" class="in"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.on('hide.bs.collapse', function () {
|
||||
equal($target.attr('aria-expanded'), 'false', 'aria-expanded on target is "false"')
|
||||
start()
|
||||
})
|
||||
|
||||
$target.click()
|
||||
})
|
||||
|
||||
test('should change aria-expanded from active accordion target to "false" and set the newly active one to "true"', function () {
|
||||
stop()
|
||||
|
||||
var accordionHTML = '<div id="accordion">'
|
||||
+ '<div class="accordion-group"/>'
|
||||
+ '<div class="accordion-group"/>'
|
||||
+ '<div class="accordion-group"/>'
|
||||
+ '</div>'
|
||||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group')
|
||||
|
||||
var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0))
|
||||
|
||||
$('<div id="body1" aria-expanded="true" class="in"/>').appendTo($groups.eq(0))
|
||||
|
||||
var $target2 = $('<a class="collapsed" data-toggle="collapse" href="#body2" data-parent="#accordion"/>').appendTo($groups.eq(1))
|
||||
|
||||
$('<div id="body2" aria-expanded="false"/>').appendTo($groups.eq(1))
|
||||
|
||||
var $target3 = $('<a class="collapsed" data-toggle="collapse" href="#body3" data-parent="#accordion"/>').appendTo($groups.eq(2))
|
||||
|
||||
$('<div id="body3" aria-expanded="false"/>')
|
||||
.appendTo($groups.eq(2))
|
||||
.on('show.bs.collapse', function () {
|
||||
equal($target1.attr('aria-expanded'), 'false', 'inactive target 1 has aria-expanded="false"')
|
||||
equal($target2.attr('aria-expanded'), 'false', 'inactive target 2 has aria-expanded="false"')
|
||||
equal($target3.attr('aria-expanded'), 'true', 'active target 3 has aria-expanded="false"')
|
||||
|
||||
start()
|
||||
})
|
||||
|
||||
$target3.click()
|
||||
})
|
||||
|
||||
})
|
||||
|
@ -141,7 +141,7 @@ $(function () {
|
||||
notEqual($('#modal-test').length, 0, 'modal insterted into dom')
|
||||
$('.contents').click()
|
||||
ok($('#modal-test').is(':visible'), 'modal visible')
|
||||
$('#modal-test').mousedown()
|
||||
$('#modal-test').click()
|
||||
})
|
||||
.on('hidden.bs.modal', function () {
|
||||
ok(!$('#modal-test').is(':visible'), 'modal hidden')
|
||||
@ -196,7 +196,7 @@ $(function () {
|
||||
$('<div id="modal-test"><div class="contents"/></div>')
|
||||
.on('shown.bs.modal', function () {
|
||||
triggered = 0
|
||||
$('#modal-test').mousedown()
|
||||
$('#modal-test').click()
|
||||
})
|
||||
.on('hide.bs.modal', function () {
|
||||
triggered += 1
|
||||
|
@ -124,12 +124,12 @@ $(function () {
|
||||
|
||||
test('should add the active class to the correct element', function () {
|
||||
var navbarHtml =
|
||||
'<div class="navbar">'
|
||||
'<nav class="navbar">'
|
||||
+ '<ul class="nav">'
|
||||
+ '<li id="li-1"><a href="#div-1">div 1</a></li>'
|
||||
+ '<li id="li-2"><a href="#div-2">div 2</a></li>'
|
||||
+ '</ul>'
|
||||
+ '</div>'
|
||||
+ '</nav>'
|
||||
var contentHtml =
|
||||
'<div class="content" style="overflow: auto; height: 50px">'
|
||||
+ '<div id="div-1" style="height: 100px; padding: 0; margin: 0">div 1</div>'
|
||||
|
@ -768,6 +768,8 @@ $(function () {
|
||||
var offset = $('.tooltip').offset()
|
||||
$styles.remove()
|
||||
ok(Math.abs(offset.left - 88) <= 1, 'tooltip has correct horizontal location')
|
||||
$circle.bootstrapTooltip('hide')
|
||||
equal($('.tooltip').length, 0, 'tooltip removed from dom')
|
||||
start()
|
||||
})
|
||||
.bootstrapTooltip({ container: 'body', placement: 'top', trigger: 'manual' })
|
||||
@ -775,4 +777,96 @@ $(function () {
|
||||
$circle.bootstrapTooltip('show')
|
||||
})
|
||||
|
||||
test('should not reload the tooltip on subsequent mouseenter events', function () {
|
||||
var titleHtml = function () {
|
||||
var uid = $.fn.bootstrapTooltip.Constructor.prototype.getUID('tooltip')
|
||||
return '<p id="tt-content">' + uid + '</p><p>' + uid + '</p><p>' + uid + '</p>'
|
||||
}
|
||||
|
||||
var $tooltip = $('<span id="tt-outer" rel="tooltip" data-trigger="hover" data-placement="top">some text</span>')
|
||||
.appendTo('#qunit-fixture')
|
||||
|
||||
$tooltip.bootstrapTooltip({
|
||||
html: true,
|
||||
animation: false,
|
||||
trigger: 'hover',
|
||||
delay: { show: 0, hide: 500 },
|
||||
container: $tooltip,
|
||||
title: titleHtml
|
||||
})
|
||||
|
||||
$('#tt-outer').trigger('mouseenter')
|
||||
|
||||
var currentUid = $('#tt-content').text()
|
||||
|
||||
$('#tt-content').trigger('mouseenter')
|
||||
equal(currentUid, $('#tt-content').text())
|
||||
})
|
||||
|
||||
test('should not reload the tooltip if the mouse leaves and re-enters before hiding', function () {
|
||||
var titleHtml = function () {
|
||||
var uid = $.fn.bootstrapTooltip.Constructor.prototype.getUID('tooltip')
|
||||
return '<p id="tt-content">' + uid + '</p><p>' + uid + '</p><p>' + uid + '</p>'
|
||||
}
|
||||
|
||||
var $tooltip = $('<span id="tt-outer" rel="tooltip" data-trigger="hover" data-placement="top">some text</span>')
|
||||
.appendTo('#qunit-fixture')
|
||||
|
||||
$tooltip.bootstrapTooltip({
|
||||
html: true,
|
||||
animation: false,
|
||||
trigger: 'hover',
|
||||
delay: { show: 0, hide: 500 },
|
||||
container: $tooltip,
|
||||
title: titleHtml
|
||||
})
|
||||
|
||||
var obj = $tooltip.data('bs.tooltip')
|
||||
|
||||
$('#tt-outer').trigger('mouseenter')
|
||||
|
||||
var currentUid = $('#tt-content').text()
|
||||
|
||||
$('#tt-outer').trigger('mouseleave')
|
||||
equal(currentUid, $('#tt-content').text())
|
||||
|
||||
ok(obj.hoverState == 'out', 'the tooltip hoverState should be set to "out"')
|
||||
|
||||
$('#tt-content').trigger('mouseenter')
|
||||
ok(obj.hoverState == 'in', 'the tooltip hoverState should be set to "in"')
|
||||
|
||||
equal(currentUid, $('#tt-content').text())
|
||||
})
|
||||
|
||||
test('should position arrow correctly when tooltip is moved to not appear offscreen', function () {
|
||||
stop()
|
||||
|
||||
var styles = '<style>'
|
||||
+ '.tooltip, .tooltip *, .tooltip *:before, .tooltip *:after { box-sizing: border-box; }'
|
||||
+ '.tooltip { position: absolute; }'
|
||||
+ '.tooltip-arrow { position: absolute; width: 0; height: 0; }'
|
||||
+ '.tooltip .tooltip-inner { max-width: 200px; padding: 3px 8px; }'
|
||||
+ '</style>'
|
||||
var $styles = $(styles).appendTo('head')
|
||||
|
||||
$('<a href="#" title="tooltip title" style="position: absolute; bottom: 0; right: 0;">Foobar</a>')
|
||||
.appendTo('body')
|
||||
.on('shown.bs.tooltip', function () {
|
||||
var arrowStyles = $(this).data('bs.tooltip').$tip.find('.tooltip-arrow').attr('style')
|
||||
ok(/left/i.test(arrowStyles) && !/top/i.test(arrowStyles), 'arrow positioned correctly')
|
||||
$(this).bootstrapTooltip('hide')
|
||||
})
|
||||
.on('hidden.bs.tooltip', function () {
|
||||
$styles.remove()
|
||||
$(this).remove()
|
||||
start()
|
||||
})
|
||||
.bootstrapTooltip({
|
||||
container: 'body',
|
||||
placement: 'top',
|
||||
trigger: 'manual'
|
||||
})
|
||||
.bootstrapTooltip('show')
|
||||
})
|
||||
|
||||
})
|
||||
|
14
js/tests/vendor/qunit.css
vendored
14
js/tests/vendor/qunit.css
vendored
@ -1,12 +1,12 @@
|
||||
/*!
|
||||
* QUnit 1.14.0
|
||||
* QUnit 1.15.0
|
||||
* http://qunitjs.com/
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2014-01-31T16:40Z
|
||||
* Date: 2014-08-08T16:00Z
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
@ -62,14 +62,14 @@
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #5E740B;
|
||||
background-color: #EEE;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
background-color: #2B81AF;
|
||||
color: #FFF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
@ -86,7 +86,7 @@
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
padding: 0.4em 1em 0.4em 1em;
|
||||
border-bottom: 1px solid #FFF;
|
||||
list-style-position: inside;
|
||||
}
|
||||
@ -215,7 +215,7 @@
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
|
||||
color: #2B81AF;
|
||||
background-color: #D2E0E6;
|
||||
|
2059
js/tests/vendor/qunit.js
vendored
2059
js/tests/vendor/qunit.js
vendored
@ -1,26 +1,27 @@
|
||||
/*!
|
||||
* QUnit 1.14.0
|
||||
* QUnit 1.15.0
|
||||
* http://qunitjs.com/
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2014-01-31T16:40Z
|
||||
* Date: 2014-08-08T16:00Z
|
||||
*/
|
||||
|
||||
(function( window ) {
|
||||
|
||||
var QUnit,
|
||||
assert,
|
||||
config,
|
||||
onErrorFnPrev,
|
||||
testId = 0,
|
||||
fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""),
|
||||
fileName = ( sourceFromStacktrace( 0 ) || "" ).replace( /(:\d+)+\)?/, "" ).replace( /.+\//, "" ),
|
||||
toString = Object.prototype.toString,
|
||||
hasOwn = Object.prototype.hasOwnProperty,
|
||||
// Keep a local reference to Date (GH-283)
|
||||
Date = window.Date,
|
||||
now = Date.now || function() {
|
||||
return new Date().getTime();
|
||||
},
|
||||
setTimeout = window.setTimeout,
|
||||
clearTimeout = window.clearTimeout,
|
||||
defined = {
|
||||
@ -32,7 +33,7 @@ var QUnit,
|
||||
sessionStorage.setItem( x, x );
|
||||
sessionStorage.removeItem( x );
|
||||
return true;
|
||||
} catch( e ) {
|
||||
} catch ( e ) {
|
||||
return false;
|
||||
}
|
||||
}())
|
||||
@ -74,20 +75,17 @@ var QUnit,
|
||||
* @return {Object} New object with only the own properties (recursively).
|
||||
*/
|
||||
objectValues = function( obj ) {
|
||||
// Grunt 0.3.x uses an older version of jshint that still has jshint/jshint#392.
|
||||
/*jshint newcap: false */
|
||||
var key, val,
|
||||
vals = QUnit.is( "array", obj ) ? [] : {};
|
||||
for ( key in obj ) {
|
||||
if ( hasOwn.call( obj, key ) ) {
|
||||
val = obj[key];
|
||||
vals[key] = val === Object(val) ? objectValues(val) : val;
|
||||
val = obj[ key ];
|
||||
vals[ key ] = val === Object( val ) ? objectValues( val ) : val;
|
||||
}
|
||||
}
|
||||
return vals;
|
||||
};
|
||||
|
||||
|
||||
// Root QUnit object.
|
||||
// `QUnit` initialized at top of scope
|
||||
QUnit = {
|
||||
@ -96,7 +94,7 @@ QUnit = {
|
||||
module: function( name, testEnvironment ) {
|
||||
config.currentModule = name;
|
||||
config.currentModuleTestEnvironment = testEnvironment;
|
||||
config.modules[name] = true;
|
||||
config.modules[ name ] = true;
|
||||
},
|
||||
|
||||
asyncTest: function( testName, expected, callback ) {
|
||||
@ -109,20 +107,14 @@ QUnit = {
|
||||
},
|
||||
|
||||
test: function( testName, expected, callback, async ) {
|
||||
var test,
|
||||
nameHtml = "<span class='test-name'>" + escapeText( testName ) + "</span>";
|
||||
var test;
|
||||
|
||||
if ( arguments.length === 2 ) {
|
||||
callback = expected;
|
||||
expected = null;
|
||||
}
|
||||
|
||||
if ( config.currentModule ) {
|
||||
nameHtml = "<span class='module-name'>" + escapeText( config.currentModule ) + "</span>: " + nameHtml;
|
||||
}
|
||||
|
||||
test = new Test({
|
||||
nameHtml: nameHtml,
|
||||
testName: testName,
|
||||
expected: expected,
|
||||
async: async,
|
||||
@ -139,16 +131,9 @@ QUnit = {
|
||||
test.queue();
|
||||
},
|
||||
|
||||
// Specify the number of expected assertions to guarantee that failed test (no assertions are run at all) don't slip through.
|
||||
expect: function( asserts ) {
|
||||
if (arguments.length === 1) {
|
||||
config.current.expected = asserts;
|
||||
} else {
|
||||
return config.current.expected;
|
||||
}
|
||||
},
|
||||
|
||||
start: function( count ) {
|
||||
var message;
|
||||
|
||||
// QUnit hasn't been initialized yet.
|
||||
// Note: RequireJS (et al) may delay onLoad
|
||||
if ( config.semaphore === undefined ) {
|
||||
@ -166,10 +151,21 @@ QUnit = {
|
||||
if ( config.semaphore > 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the starting time when the first test is run
|
||||
QUnit.config.started = QUnit.config.started || now();
|
||||
// ignore if start is called more often then stop
|
||||
if ( config.semaphore < 0 ) {
|
||||
config.semaphore = 0;
|
||||
QUnit.pushFailure( "Called start() while already started (QUnit.config.semaphore was 0 already)", null, sourceFromStacktrace(2) );
|
||||
|
||||
message = "Called start() while already started (QUnit.config.semaphore was 0 already)";
|
||||
|
||||
if ( config.current ) {
|
||||
QUnit.pushFailure( message, sourceFromStacktrace( 2 ) );
|
||||
} else {
|
||||
throw new Error( message );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
// A slight delay, to avoid any current callbacks
|
||||
@ -184,7 +180,7 @@ QUnit = {
|
||||
|
||||
config.blocking = false;
|
||||
process( true );
|
||||
}, 13);
|
||||
}, 13 );
|
||||
} else {
|
||||
config.blocking = false;
|
||||
process( true );
|
||||
@ -212,6 +208,7 @@ QUnit = {
|
||||
function F() {}
|
||||
F.prototype = QUnit;
|
||||
QUnit = new F();
|
||||
|
||||
// Make F QUnit's constructor so that we can add to the prototype later
|
||||
QUnit.constructor = F;
|
||||
}());
|
||||
@ -263,14 +260,7 @@ config = {
|
||||
// Set of all modules.
|
||||
modules: {},
|
||||
|
||||
// logging callback queues
|
||||
begin: [],
|
||||
done: [],
|
||||
log: [],
|
||||
testStart: [],
|
||||
testDone: [],
|
||||
moduleStart: [],
|
||||
moduleDone: []
|
||||
callbacks: {}
|
||||
};
|
||||
|
||||
// Initialize more QUnit.config and QUnit.urlParams
|
||||
@ -323,71 +313,6 @@ extend( QUnit, {
|
||||
|
||||
config: config,
|
||||
|
||||
// Initialize the configuration options
|
||||
init: function() {
|
||||
extend( config, {
|
||||
stats: { all: 0, bad: 0 },
|
||||
moduleStats: { all: 0, bad: 0 },
|
||||
started: +new Date(),
|
||||
updateRate: 1000,
|
||||
blocking: false,
|
||||
autostart: true,
|
||||
autorun: false,
|
||||
filter: "",
|
||||
queue: [],
|
||||
semaphore: 1
|
||||
});
|
||||
|
||||
var tests, banner, result,
|
||||
qunit = id( "qunit" );
|
||||
|
||||
if ( qunit ) {
|
||||
qunit.innerHTML =
|
||||
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
||||
"<h2 id='qunit-banner'></h2>" +
|
||||
"<div id='qunit-testrunner-toolbar'></div>" +
|
||||
"<h2 id='qunit-userAgent'></h2>" +
|
||||
"<ol id='qunit-tests'></ol>";
|
||||
}
|
||||
|
||||
tests = id( "qunit-tests" );
|
||||
banner = id( "qunit-banner" );
|
||||
result = id( "qunit-testresult" );
|
||||
|
||||
if ( tests ) {
|
||||
tests.innerHTML = "";
|
||||
}
|
||||
|
||||
if ( banner ) {
|
||||
banner.className = "";
|
||||
}
|
||||
|
||||
if ( result ) {
|
||||
result.parentNode.removeChild( result );
|
||||
}
|
||||
|
||||
if ( tests ) {
|
||||
result = document.createElement( "p" );
|
||||
result.id = "qunit-testresult";
|
||||
result.className = "result";
|
||||
tests.parentNode.insertBefore( result, tests );
|
||||
result.innerHTML = "Running...<br/> ";
|
||||
}
|
||||
},
|
||||
|
||||
// Resets the test setup. Useful for tests that modify the DOM.
|
||||
/*
|
||||
DEPRECATED: Use multiple tests instead of resetting inside a test.
|
||||
Use testStart or testDone for custom cleanup.
|
||||
This method will throw an error in 2.0, and will be removed in 2.1
|
||||
*/
|
||||
reset: function() {
|
||||
var fixture = id( "qunit-fixture" );
|
||||
if ( fixture ) {
|
||||
fixture.innerHTML = config.fixture;
|
||||
}
|
||||
},
|
||||
|
||||
// Safe object type checking
|
||||
is: function( type, obj ) {
|
||||
return QUnit.objectType( obj ) === type;
|
||||
@ -403,12 +328,12 @@ extend( QUnit, {
|
||||
return "null";
|
||||
}
|
||||
|
||||
var match = toString.call( obj ).match(/^\[object\s(.*)\]$/),
|
||||
type = match && match[1] || "";
|
||||
var match = toString.call( obj ).match( /^\[object\s(.*)\]$/ ),
|
||||
type = match && match[ 1 ] || "";
|
||||
|
||||
switch ( type ) {
|
||||
case "Number":
|
||||
if ( isNaN(obj) ) {
|
||||
if ( isNaN( obj ) ) {
|
||||
return "nan";
|
||||
}
|
||||
return "number";
|
||||
@ -426,91 +351,6 @@ extend( QUnit, {
|
||||
return undefined;
|
||||
},
|
||||
|
||||
push: function( result, actual, expected, message ) {
|
||||
if ( !config.current ) {
|
||||
throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
|
||||
}
|
||||
|
||||
var output, source,
|
||||
details = {
|
||||
module: config.current.module,
|
||||
name: config.current.testName,
|
||||
result: result,
|
||||
message: message,
|
||||
actual: actual,
|
||||
expected: expected
|
||||
};
|
||||
|
||||
message = escapeText( message ) || ( result ? "okay" : "failed" );
|
||||
message = "<span class='test-message'>" + message + "</span>";
|
||||
output = message;
|
||||
|
||||
if ( !result ) {
|
||||
expected = escapeText( QUnit.jsDump.parse(expected) );
|
||||
actual = escapeText( QUnit.jsDump.parse(actual) );
|
||||
output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
|
||||
|
||||
if ( actual !== expected ) {
|
||||
output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
|
||||
output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
|
||||
}
|
||||
|
||||
source = sourceFromStacktrace();
|
||||
|
||||
if ( source ) {
|
||||
details.source = source;
|
||||
output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
|
||||
}
|
||||
|
||||
output += "</table>";
|
||||
}
|
||||
|
||||
runLoggingCallbacks( "log", QUnit, details );
|
||||
|
||||
config.current.assertions.push({
|
||||
result: !!result,
|
||||
message: output
|
||||
});
|
||||
},
|
||||
|
||||
pushFailure: function( message, source, actual ) {
|
||||
if ( !config.current ) {
|
||||
throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) );
|
||||
}
|
||||
|
||||
var output,
|
||||
details = {
|
||||
module: config.current.module,
|
||||
name: config.current.testName,
|
||||
result: false,
|
||||
message: message
|
||||
};
|
||||
|
||||
message = escapeText( message ) || "error";
|
||||
message = "<span class='test-message'>" + message + "</span>";
|
||||
output = message;
|
||||
|
||||
output += "<table>";
|
||||
|
||||
if ( actual ) {
|
||||
output += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeText( actual ) + "</pre></td></tr>";
|
||||
}
|
||||
|
||||
if ( source ) {
|
||||
details.source = source;
|
||||
output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
|
||||
}
|
||||
|
||||
output += "</table>";
|
||||
|
||||
runLoggingCallbacks( "log", QUnit, details );
|
||||
|
||||
config.current.assertions.push({
|
||||
result: false,
|
||||
message: output
|
||||
});
|
||||
},
|
||||
|
||||
url: function( params ) {
|
||||
params = extend( extend( {}, QUnit.urlParams ), params );
|
||||
var key,
|
||||
@ -526,13 +366,7 @@ extend( QUnit, {
|
||||
window.location.pathname + querystring.slice( 0, -1 );
|
||||
},
|
||||
|
||||
extend: extend,
|
||||
id: id,
|
||||
addEvent: addEvent,
|
||||
addClass: addClass,
|
||||
hasClass: hasClass,
|
||||
removeClass: removeClass
|
||||
// load, equiv, jsDump, diff: Attached later
|
||||
extend: extend
|
||||
});
|
||||
|
||||
/**
|
||||
@ -567,215 +401,29 @@ extend( QUnit.constructor.prototype, {
|
||||
moduleDone: registerLoggingCallback( "moduleDone" )
|
||||
});
|
||||
|
||||
if ( !defined.document || document.readyState === "complete" ) {
|
||||
config.autorun = true;
|
||||
}
|
||||
|
||||
QUnit.load = function() {
|
||||
runLoggingCallbacks( "begin", QUnit, {} );
|
||||
runLoggingCallbacks( "begin", {
|
||||
totalTests: Test.count
|
||||
});
|
||||
|
||||
// Initialize the config, saving the execution queue
|
||||
var banner, filter, i, j, label, len, main, ol, toolbar, val, selection,
|
||||
urlConfigContainer, moduleFilter, userAgent,
|
||||
numModules = 0,
|
||||
moduleNames = [],
|
||||
moduleFilterHtml = "",
|
||||
urlConfigHtml = "",
|
||||
oldconfig = extend( {}, config );
|
||||
|
||||
QUnit.init();
|
||||
extend(config, oldconfig);
|
||||
// Initialize the configuration options
|
||||
extend( config, {
|
||||
stats: { all: 0, bad: 0 },
|
||||
moduleStats: { all: 0, bad: 0 },
|
||||
started: 0,
|
||||
updateRate: 1000,
|
||||
autostart: true,
|
||||
filter: "",
|
||||
semaphore: 1
|
||||
}, true );
|
||||
|
||||
config.blocking = false;
|
||||
|
||||
len = config.urlConfig.length;
|
||||
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
val = config.urlConfig[i];
|
||||
if ( typeof val === "string" ) {
|
||||
val = {
|
||||
id: val,
|
||||
label: val
|
||||
};
|
||||
}
|
||||
config[ val.id ] = QUnit.urlParams[ val.id ];
|
||||
if ( !val.value || typeof val.value === "string" ) {
|
||||
urlConfigHtml += "<input id='qunit-urlconfig-" + escapeText( val.id ) +
|
||||
"' name='" + escapeText( val.id ) +
|
||||
"' type='checkbox'" +
|
||||
( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
|
||||
( config[ val.id ] ? " checked='checked'" : "" ) +
|
||||
" title='" + escapeText( val.tooltip ) +
|
||||
"'><label for='qunit-urlconfig-" + escapeText( val.id ) +
|
||||
"' title='" + escapeText( val.tooltip ) + "'>" + val.label + "</label>";
|
||||
} else {
|
||||
urlConfigHtml += "<label for='qunit-urlconfig-" + escapeText( val.id ) +
|
||||
"' title='" + escapeText( val.tooltip ) +
|
||||
"'>" + val.label +
|
||||
": </label><select id='qunit-urlconfig-" + escapeText( val.id ) +
|
||||
"' name='" + escapeText( val.id ) +
|
||||
"' title='" + escapeText( val.tooltip ) +
|
||||
"'><option></option>";
|
||||
selection = false;
|
||||
if ( QUnit.is( "array", val.value ) ) {
|
||||
for ( j = 0; j < val.value.length; j++ ) {
|
||||
urlConfigHtml += "<option value='" + escapeText( val.value[j] ) + "'" +
|
||||
( config[ val.id ] === val.value[j] ?
|
||||
(selection = true) && " selected='selected'" :
|
||||
"" ) +
|
||||
">" + escapeText( val.value[j] ) + "</option>";
|
||||
}
|
||||
} else {
|
||||
for ( j in val.value ) {
|
||||
if ( hasOwn.call( val.value, j ) ) {
|
||||
urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
|
||||
( config[ val.id ] === j ?
|
||||
(selection = true) && " selected='selected'" :
|
||||
"" ) +
|
||||
">" + escapeText( val.value[j] ) + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( config[ val.id ] && !selection ) {
|
||||
urlConfigHtml += "<option value='" + escapeText( config[ val.id ] ) +
|
||||
"' selected='selected' disabled='disabled'>" +
|
||||
escapeText( config[ val.id ] ) +
|
||||
"</option>";
|
||||
}
|
||||
urlConfigHtml += "</select>";
|
||||
}
|
||||
}
|
||||
for ( i in config.modules ) {
|
||||
if ( config.modules.hasOwnProperty( i ) ) {
|
||||
moduleNames.push(i);
|
||||
}
|
||||
}
|
||||
numModules = moduleNames.length;
|
||||
moduleNames.sort( function( a, b ) {
|
||||
return a.localeCompare( b );
|
||||
});
|
||||
moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label><select id='qunit-modulefilter' name='modulefilter'><option value='' " +
|
||||
( config.module === undefined ? "selected='selected'" : "" ) +
|
||||
">< All Modules ></option>";
|
||||
|
||||
|
||||
for ( i = 0; i < numModules; i++) {
|
||||
moduleFilterHtml += "<option value='" + escapeText( encodeURIComponent(moduleNames[i]) ) + "' " +
|
||||
( config.module === moduleNames[i] ? "selected='selected'" : "" ) +
|
||||
">" + escapeText(moduleNames[i]) + "</option>";
|
||||
}
|
||||
moduleFilterHtml += "</select>";
|
||||
|
||||
// `userAgent` initialized at top of scope
|
||||
userAgent = id( "qunit-userAgent" );
|
||||
if ( userAgent ) {
|
||||
userAgent.innerHTML = navigator.userAgent;
|
||||
}
|
||||
|
||||
// `banner` initialized at top of scope
|
||||
banner = id( "qunit-header" );
|
||||
if ( banner ) {
|
||||
banner.innerHTML = "<a href='" + QUnit.url({ filter: undefined, module: undefined, testNumber: undefined }) + "'>" + banner.innerHTML + "</a> ";
|
||||
}
|
||||
|
||||
// `toolbar` initialized at top of scope
|
||||
toolbar = id( "qunit-testrunner-toolbar" );
|
||||
if ( toolbar ) {
|
||||
// `filter` initialized at top of scope
|
||||
filter = document.createElement( "input" );
|
||||
filter.type = "checkbox";
|
||||
filter.id = "qunit-filter-pass";
|
||||
|
||||
addEvent( filter, "click", function() {
|
||||
var tmp,
|
||||
ol = id( "qunit-tests" );
|
||||
|
||||
if ( filter.checked ) {
|
||||
ol.className = ol.className + " hidepass";
|
||||
} else {
|
||||
tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
|
||||
ol.className = tmp.replace( / hidepass /, " " );
|
||||
}
|
||||
if ( defined.sessionStorage ) {
|
||||
if (filter.checked) {
|
||||
sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
|
||||
} else {
|
||||
sessionStorage.removeItem( "qunit-filter-passed-tests" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
|
||||
filter.checked = true;
|
||||
// `ol` initialized at top of scope
|
||||
ol = id( "qunit-tests" );
|
||||
ol.className = ol.className + " hidepass";
|
||||
}
|
||||
toolbar.appendChild( filter );
|
||||
|
||||
// `label` initialized at top of scope
|
||||
label = document.createElement( "label" );
|
||||
label.setAttribute( "for", "qunit-filter-pass" );
|
||||
label.setAttribute( "title", "Only show tests and assertions that fail. Stored in sessionStorage." );
|
||||
label.innerHTML = "Hide passed tests";
|
||||
toolbar.appendChild( label );
|
||||
|
||||
urlConfigContainer = document.createElement("span");
|
||||
urlConfigContainer.innerHTML = urlConfigHtml;
|
||||
// For oldIE support:
|
||||
// * Add handlers to the individual elements instead of the container
|
||||
// * Use "click" instead of "change" for checkboxes
|
||||
// * Fallback from event.target to event.srcElement
|
||||
addEvents( urlConfigContainer.getElementsByTagName("input"), "click", function( event ) {
|
||||
var params = {},
|
||||
target = event.target || event.srcElement;
|
||||
params[ target.name ] = target.checked ?
|
||||
target.defaultValue || true :
|
||||
undefined;
|
||||
window.location = QUnit.url( params );
|
||||
});
|
||||
addEvents( urlConfigContainer.getElementsByTagName("select"), "change", function( event ) {
|
||||
var params = {},
|
||||
target = event.target || event.srcElement;
|
||||
params[ target.name ] = target.options[ target.selectedIndex ].value || undefined;
|
||||
window.location = QUnit.url( params );
|
||||
});
|
||||
toolbar.appendChild( urlConfigContainer );
|
||||
|
||||
if (numModules > 1) {
|
||||
moduleFilter = document.createElement( "span" );
|
||||
moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
|
||||
moduleFilter.innerHTML = moduleFilterHtml;
|
||||
addEvent( moduleFilter.lastChild, "change", function() {
|
||||
var selectBox = moduleFilter.getElementsByTagName("select")[0],
|
||||
selectedModule = decodeURIComponent(selectBox.options[selectBox.selectedIndex].value);
|
||||
|
||||
window.location = QUnit.url({
|
||||
module: ( selectedModule === "" ) ? undefined : selectedModule,
|
||||
// Remove any existing filters
|
||||
filter: undefined,
|
||||
testNumber: undefined
|
||||
});
|
||||
});
|
||||
toolbar.appendChild(moduleFilter);
|
||||
}
|
||||
}
|
||||
|
||||
// `main` initialized at top of scope
|
||||
main = id( "qunit-fixture" );
|
||||
if ( main ) {
|
||||
config.fixture = main.innerHTML;
|
||||
}
|
||||
|
||||
if ( config.autostart ) {
|
||||
QUnit.start();
|
||||
}
|
||||
};
|
||||
|
||||
if ( defined.document ) {
|
||||
addEvent( window, "load", QUnit.load );
|
||||
}
|
||||
|
||||
// `onErrorFnPrev` initialized at top of scope
|
||||
// Preserve other handlers
|
||||
onErrorFnPrev = window.onerror;
|
||||
@ -783,7 +431,7 @@ onErrorFnPrev = window.onerror;
|
||||
// Cover uncaught exceptions
|
||||
// Returning true will suppress the default browser handler,
|
||||
// returning false will let it run.
|
||||
window.onerror = function ( error, filePath, linerNr ) {
|
||||
window.onerror = function( error, filePath, linerNr ) {
|
||||
var ret = false;
|
||||
if ( onErrorFnPrev ) {
|
||||
ret = onErrorFnPrev( error, filePath, linerNr );
|
||||
@ -798,7 +446,7 @@ window.onerror = function ( error, filePath, linerNr ) {
|
||||
}
|
||||
QUnit.pushFailure( error, filePath + ":" + linerNr );
|
||||
} else {
|
||||
QUnit.test( "global failure", extend( function() {
|
||||
QUnit.test( "global failure", extend(function() {
|
||||
QUnit.pushFailure( error, filePath + ":" + linerNr );
|
||||
}, { validTest: validTest } ) );
|
||||
}
|
||||
@ -813,7 +461,7 @@ function done() {
|
||||
|
||||
// Log the last module results
|
||||
if ( config.previousModule ) {
|
||||
runLoggingCallbacks( "moduleDone", QUnit, {
|
||||
runLoggingCallbacks( "moduleDone", {
|
||||
name: config.previousModule,
|
||||
failed: config.moduleStats.bad,
|
||||
passed: config.moduleStats.all - config.moduleStats.bad,
|
||||
@ -822,58 +470,10 @@ function done() {
|
||||
}
|
||||
delete config.previousModule;
|
||||
|
||||
var i, key,
|
||||
banner = id( "qunit-banner" ),
|
||||
tests = id( "qunit-tests" ),
|
||||
runtime = +new Date() - config.started,
|
||||
passed = config.stats.all - config.stats.bad,
|
||||
html = [
|
||||
"Tests completed in ",
|
||||
runtime,
|
||||
" milliseconds.<br/>",
|
||||
"<span class='passed'>",
|
||||
passed,
|
||||
"</span> assertions of <span class='total'>",
|
||||
config.stats.all,
|
||||
"</span> passed, <span class='failed'>",
|
||||
config.stats.bad,
|
||||
"</span> failed."
|
||||
].join( "" );
|
||||
var runtime = now() - config.started,
|
||||
passed = config.stats.all - config.stats.bad;
|
||||
|
||||
if ( banner ) {
|
||||
banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" );
|
||||
}
|
||||
|
||||
if ( tests ) {
|
||||
id( "qunit-testresult" ).innerHTML = html;
|
||||
}
|
||||
|
||||
if ( config.altertitle && defined.document && document.title ) {
|
||||
// show ✖ for good, ✔ for bad suite result in title
|
||||
// use escape sequences in case file gets loaded with non-utf-8-charset
|
||||
document.title = [
|
||||
( config.stats.bad ? "\u2716" : "\u2714" ),
|
||||
document.title.replace( /^[\u2714\u2716] /i, "" )
|
||||
].join( " " );
|
||||
}
|
||||
|
||||
// clear own sessionStorage items if all tests passed
|
||||
if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
|
||||
// `key` & `i` initialized at top of scope
|
||||
for ( i = 0; i < sessionStorage.length; i++ ) {
|
||||
key = sessionStorage.key( i++ );
|
||||
if ( key.indexOf( "qunit-test-" ) === 0 ) {
|
||||
sessionStorage.removeItem( key );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// scroll back to top to show results
|
||||
if ( config.scrolltop && window.scrollTo ) {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
runLoggingCallbacks( "done", QUnit, {
|
||||
runLoggingCallbacks( "done", {
|
||||
failed: config.stats.bad,
|
||||
passed: passed,
|
||||
total: config.stats.all,
|
||||
@ -922,21 +522,22 @@ function validTest( test ) {
|
||||
return !include;
|
||||
}
|
||||
|
||||
// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
|
||||
// Later Safari and IE10 are supposed to support error.stack as well
|
||||
// Doesn't support IE6 to IE9
|
||||
// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
|
||||
function extractStacktrace( e, offset ) {
|
||||
offset = offset === undefined ? 3 : offset;
|
||||
offset = offset === undefined ? 4 : offset;
|
||||
|
||||
var stack, include, i;
|
||||
|
||||
if ( e.stacktrace ) {
|
||||
// Opera
|
||||
|
||||
// Opera 12.x
|
||||
return e.stacktrace.split( "\n" )[ offset + 3 ];
|
||||
} else if ( e.stack ) {
|
||||
// Firefox, Chrome
|
||||
|
||||
// Firefox, Chrome, Safari 6+, IE10+, PhantomJS and Node
|
||||
stack = e.stack.split( "\n" );
|
||||
if (/^error$/i.test( stack[0] ) ) {
|
||||
if ( /^error$/i.test( stack[ 0 ] ) ) {
|
||||
stack.shift();
|
||||
}
|
||||
if ( fileName ) {
|
||||
@ -953,12 +554,13 @@ function extractStacktrace( e, offset ) {
|
||||
}
|
||||
return stack[ offset ];
|
||||
} else if ( e.sourceURL ) {
|
||||
// Safari, PhantomJS
|
||||
// hopefully one day Safari provides actual stacktraces
|
||||
|
||||
// Safari < 6
|
||||
// exclude useless self-reference for generated Error objects
|
||||
if ( /qunit.js$/.test( e.sourceURL ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// for actual exceptions, this is useful
|
||||
return e.sourceURL + ":" + e.line;
|
||||
}
|
||||
@ -971,31 +573,6 @@ function sourceFromStacktrace( offset ) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape text for attribute or text content.
|
||||
*/
|
||||
function escapeText( s ) {
|
||||
if ( !s ) {
|
||||
return "";
|
||||
}
|
||||
s = s + "";
|
||||
// Both single quotes and double quotes (for attributes)
|
||||
return s.replace( /['"<>&]/g, function( s ) {
|
||||
switch( s ) {
|
||||
case "'":
|
||||
return "'";
|
||||
case "\"":
|
||||
return """;
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
case "&":
|
||||
return "&";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function synchronize( callback, last ) {
|
||||
config.queue.push( callback );
|
||||
|
||||
@ -1008,11 +585,11 @@ function process( last ) {
|
||||
function next() {
|
||||
process( last );
|
||||
}
|
||||
var start = new Date().getTime();
|
||||
var start = now();
|
||||
config.depth = config.depth ? config.depth + 1 : 1;
|
||||
|
||||
while ( config.queue.length && !config.blocking ) {
|
||||
if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
|
||||
if ( !defined.setTimeout || config.updateRate <= 0 || ( ( now() - start ) < config.updateRate ) ) {
|
||||
config.queue.shift()();
|
||||
} else {
|
||||
setTimeout( next, 13 );
|
||||
@ -1050,12 +627,12 @@ function checkPollution() {
|
||||
|
||||
newGlobals = diff( config.pollution, old );
|
||||
if ( newGlobals.length > 0 ) {
|
||||
QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
|
||||
QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join( ", " ) );
|
||||
}
|
||||
|
||||
deletedGlobals = diff( old, config.pollution );
|
||||
if ( deletedGlobals.length > 0 ) {
|
||||
QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
|
||||
QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join( ", " ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1066,7 +643,7 @@ function diff( a, b ) {
|
||||
|
||||
for ( i = 0; i < result.length; i++ ) {
|
||||
for ( j = 0; j < b.length; j++ ) {
|
||||
if ( result[i] === b[j] ) {
|
||||
if ( result[ i ] === b[ j ] ) {
|
||||
result.splice( i, 1 );
|
||||
i--;
|
||||
break;
|
||||
@ -1076,14 +653,15 @@ function diff( a, b ) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function extend( a, b ) {
|
||||
function extend( a, b, undefOnly ) {
|
||||
for ( var prop in b ) {
|
||||
if ( hasOwn.call( b, prop ) ) {
|
||||
|
||||
// Avoid "Member not found" error in IE8 caused by messing with window.constructor
|
||||
if ( !( prop === "constructor" && a === window ) ) {
|
||||
if ( b[ prop ] === undefined ) {
|
||||
delete a[ prop ];
|
||||
} else {
|
||||
} else if ( !( undefOnly && typeof a[ prop ] !== "undefined" ) ) {
|
||||
a[ prop ] = b[ prop ];
|
||||
}
|
||||
}
|
||||
@ -1093,79 +671,24 @@ function extend( a, b ) {
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} elem
|
||||
* @param {string} type
|
||||
* @param {Function} fn
|
||||
*/
|
||||
function addEvent( elem, type, fn ) {
|
||||
if ( elem.addEventListener ) {
|
||||
|
||||
// Standards-based browsers
|
||||
elem.addEventListener( type, fn, false );
|
||||
} else if ( elem.attachEvent ) {
|
||||
|
||||
// support: IE <9
|
||||
elem.attachEvent( "on" + type, fn );
|
||||
} else {
|
||||
|
||||
// Caller must ensure support for event listeners is present
|
||||
throw new Error( "addEvent() was called in a context without event listener support" );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array|NodeList} elems
|
||||
* @param {string} type
|
||||
* @param {Function} fn
|
||||
*/
|
||||
function addEvents( elems, type, fn ) {
|
||||
var i = elems.length;
|
||||
while ( i-- ) {
|
||||
addEvent( elems[i], type, fn );
|
||||
}
|
||||
}
|
||||
|
||||
function hasClass( elem, name ) {
|
||||
return (" " + elem.className + " ").indexOf(" " + name + " ") > -1;
|
||||
}
|
||||
|
||||
function addClass( elem, name ) {
|
||||
if ( !hasClass( elem, name ) ) {
|
||||
elem.className += (elem.className ? " " : "") + name;
|
||||
}
|
||||
}
|
||||
|
||||
function removeClass( elem, name ) {
|
||||
var set = " " + elem.className + " ";
|
||||
// Class name may appear multiple times
|
||||
while ( set.indexOf(" " + name + " ") > -1 ) {
|
||||
set = set.replace(" " + name + " " , " ");
|
||||
}
|
||||
// If possible, trim it for prettiness, but not necessarily
|
||||
elem.className = typeof set.trim === "function" ? set.trim() : set.replace(/^\s+|\s+$/g, "");
|
||||
}
|
||||
|
||||
function id( name ) {
|
||||
return defined.document && document.getElementById && document.getElementById( name );
|
||||
}
|
||||
|
||||
function registerLoggingCallback( key ) {
|
||||
|
||||
// Initialize key collection of logging callback
|
||||
if ( QUnit.objectType( config.callbacks[ key ] ) === "undefined" ) {
|
||||
config.callbacks[ key ] = [];
|
||||
}
|
||||
|
||||
return function( callback ) {
|
||||
config[key].push( callback );
|
||||
config.callbacks[ key ].push( callback );
|
||||
};
|
||||
}
|
||||
|
||||
// Supports deprecated method of completely overwriting logging callbacks
|
||||
function runLoggingCallbacks( key, scope, args ) {
|
||||
var i, callbacks;
|
||||
if ( QUnit.hasOwnProperty( key ) ) {
|
||||
QUnit[ key ].call(scope, args );
|
||||
} else {
|
||||
callbacks = config[ key ];
|
||||
for ( i = 0; i < callbacks.length; i++ ) {
|
||||
callbacks[ i ].call( scope, args );
|
||||
}
|
||||
function runLoggingCallbacks( key, args ) {
|
||||
var i, l, callbacks;
|
||||
|
||||
callbacks = config.callbacks[ key ];
|
||||
for ( i = 0, l = callbacks.length; i < l; i++ ) {
|
||||
callbacks[ i ]( args );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1186,6 +709,7 @@ function inArray( elem, array ) {
|
||||
|
||||
function Test( settings ) {
|
||||
extend( this, settings );
|
||||
this.assert = new Assert( this );
|
||||
this.assertions = [];
|
||||
this.testNumber = ++Test.count;
|
||||
}
|
||||
@ -1193,32 +717,12 @@ function Test( settings ) {
|
||||
Test.count = 0;
|
||||
|
||||
Test.prototype = {
|
||||
init: function() {
|
||||
var a, b, li,
|
||||
tests = id( "qunit-tests" );
|
||||
|
||||
if ( tests ) {
|
||||
b = document.createElement( "strong" );
|
||||
b.innerHTML = this.nameHtml;
|
||||
|
||||
// `a` initialized at top of scope
|
||||
a = document.createElement( "a" );
|
||||
a.innerHTML = "Rerun";
|
||||
a.href = QUnit.url({ testNumber: this.testNumber });
|
||||
|
||||
li = document.createElement( "li" );
|
||||
li.appendChild( b );
|
||||
li.appendChild( a );
|
||||
li.className = "running";
|
||||
li.id = this.id = "qunit-test-output" + testId++;
|
||||
|
||||
tests.appendChild( li );
|
||||
}
|
||||
},
|
||||
setup: function() {
|
||||
if (
|
||||
|
||||
// Emit moduleStart when we're switching from one module to another
|
||||
this.module !== config.previousModule ||
|
||||
|
||||
// They could be equal (both undefined) but if the previousModule property doesn't
|
||||
// yet exist it means this is the first test in a suite that isn't wrapped in a
|
||||
// module, in which case we'll just emit a moduleStart event for 'undefined'.
|
||||
@ -1226,7 +730,7 @@ Test.prototype = {
|
||||
!hasOwn.call( config, "previousModule" )
|
||||
) {
|
||||
if ( hasOwn.call( config, "previousModule" ) ) {
|
||||
runLoggingCallbacks( "moduleDone", QUnit, {
|
||||
runLoggingCallbacks( "moduleDone", {
|
||||
name: config.previousModule,
|
||||
failed: config.moduleStats.bad,
|
||||
passed: config.moduleStats.all - config.moduleStats.bad,
|
||||
@ -1235,7 +739,7 @@ Test.prototype = {
|
||||
}
|
||||
config.previousModule = this.module;
|
||||
config.moduleStats = { all: 0, bad: 0 };
|
||||
runLoggingCallbacks( "moduleStart", QUnit, {
|
||||
runLoggingCallbacks( "moduleStart", {
|
||||
name: this.module
|
||||
});
|
||||
}
|
||||
@ -1247,65 +751,49 @@ Test.prototype = {
|
||||
teardown: function() {}
|
||||
}, this.moduleTestEnvironment );
|
||||
|
||||
this.started = +new Date();
|
||||
runLoggingCallbacks( "testStart", QUnit, {
|
||||
this.started = now();
|
||||
runLoggingCallbacks( "testStart", {
|
||||
name: this.testName,
|
||||
module: this.module
|
||||
module: this.module,
|
||||
testNumber: this.testNumber
|
||||
});
|
||||
|
||||
/*jshint camelcase:false */
|
||||
|
||||
|
||||
/**
|
||||
* Expose the current test environment.
|
||||
*
|
||||
* @deprecated since 1.12.0: Use QUnit.config.current.testEnvironment instead.
|
||||
*/
|
||||
QUnit.current_testEnvironment = this.testEnvironment;
|
||||
|
||||
/*jshint camelcase:true */
|
||||
|
||||
if ( !config.pollution ) {
|
||||
saveGlobal();
|
||||
}
|
||||
if ( config.notrycatch ) {
|
||||
this.testEnvironment.setup.call( this.testEnvironment, QUnit.assert );
|
||||
this.testEnvironment.setup.call( this.testEnvironment, this.assert );
|
||||
return;
|
||||
}
|
||||
try {
|
||||
this.testEnvironment.setup.call( this.testEnvironment, QUnit.assert );
|
||||
} catch( e ) {
|
||||
QUnit.pushFailure( "Setup failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
|
||||
this.testEnvironment.setup.call( this.testEnvironment, this.assert );
|
||||
} catch ( e ) {
|
||||
this.pushFailure( "Setup failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
||||
}
|
||||
},
|
||||
run: function() {
|
||||
config.current = this;
|
||||
|
||||
var running = id( "qunit-testresult" );
|
||||
|
||||
if ( running ) {
|
||||
running.innerHTML = "Running: <br/>" + this.nameHtml;
|
||||
}
|
||||
|
||||
if ( this.async ) {
|
||||
QUnit.stop();
|
||||
}
|
||||
|
||||
this.callbackStarted = +new Date();
|
||||
this.callbackStarted = now();
|
||||
|
||||
if ( config.notrycatch ) {
|
||||
this.callback.call( this.testEnvironment, QUnit.assert );
|
||||
this.callbackRuntime = +new Date() - this.callbackStarted;
|
||||
this.callback.call( this.testEnvironment, this.assert );
|
||||
this.callbackRuntime = now() - this.callbackStarted;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this.callback.call( this.testEnvironment, QUnit.assert );
|
||||
this.callbackRuntime = +new Date() - this.callbackStarted;
|
||||
} catch( e ) {
|
||||
this.callbackRuntime = +new Date() - this.callbackStarted;
|
||||
this.callback.call( this.testEnvironment, this.assert );
|
||||
this.callbackRuntime = now() - this.callbackStarted;
|
||||
} catch ( e ) {
|
||||
this.callbackRuntime = now() - this.callbackStarted;
|
||||
|
||||
this.pushFailure( "Died on test #" + ( this.assertions.length + 1 ) + " " + this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
||||
|
||||
QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
||||
// else next test will carry the responsibility
|
||||
saveGlobal();
|
||||
|
||||
@ -1319,15 +807,15 @@ Test.prototype = {
|
||||
config.current = this;
|
||||
if ( config.notrycatch ) {
|
||||
if ( typeof this.callbackRuntime === "undefined" ) {
|
||||
this.callbackRuntime = +new Date() - this.callbackStarted;
|
||||
this.callbackRuntime = now() - this.callbackStarted;
|
||||
}
|
||||
this.testEnvironment.teardown.call( this.testEnvironment, QUnit.assert );
|
||||
this.testEnvironment.teardown.call( this.testEnvironment, this.assert );
|
||||
return;
|
||||
} else {
|
||||
try {
|
||||
this.testEnvironment.teardown.call( this.testEnvironment, QUnit.assert );
|
||||
} catch( e ) {
|
||||
QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
|
||||
this.testEnvironment.teardown.call( this.testEnvironment, this.assert );
|
||||
} catch ( e ) {
|
||||
this.pushFailure( "Teardown failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
||||
}
|
||||
}
|
||||
checkPollution();
|
||||
@ -1335,115 +823,44 @@ Test.prototype = {
|
||||
finish: function() {
|
||||
config.current = this;
|
||||
if ( config.requireExpects && this.expected === null ) {
|
||||
QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
|
||||
this.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
|
||||
} else if ( this.expected !== null && this.expected !== this.assertions.length ) {
|
||||
QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
|
||||
this.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
|
||||
} else if ( this.expected === null && !this.assertions.length ) {
|
||||
QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
|
||||
this.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
|
||||
}
|
||||
|
||||
var i, assertion, a, b, time, li, ol,
|
||||
test = this,
|
||||
good = 0,
|
||||
bad = 0,
|
||||
tests = id( "qunit-tests" );
|
||||
var i,
|
||||
bad = 0;
|
||||
|
||||
this.runtime = +new Date() - this.started;
|
||||
this.runtime = now() - this.started;
|
||||
config.stats.all += this.assertions.length;
|
||||
config.moduleStats.all += this.assertions.length;
|
||||
|
||||
if ( tests ) {
|
||||
ol = document.createElement( "ol" );
|
||||
ol.className = "qunit-assert-list";
|
||||
|
||||
for ( i = 0; i < this.assertions.length; i++ ) {
|
||||
assertion = this.assertions[i];
|
||||
|
||||
li = document.createElement( "li" );
|
||||
li.className = assertion.result ? "pass" : "fail";
|
||||
li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" );
|
||||
ol.appendChild( li );
|
||||
|
||||
if ( assertion.result ) {
|
||||
good++;
|
||||
} else {
|
||||
bad++;
|
||||
config.stats.bad++;
|
||||
config.moduleStats.bad++;
|
||||
}
|
||||
}
|
||||
|
||||
// store result when possible
|
||||
if ( QUnit.config.reorder && defined.sessionStorage ) {
|
||||
if ( bad ) {
|
||||
sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad );
|
||||
} else {
|
||||
sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName );
|
||||
}
|
||||
}
|
||||
|
||||
if ( bad === 0 ) {
|
||||
addClass( ol, "qunit-collapsed" );
|
||||
}
|
||||
|
||||
// `b` initialized at top of scope
|
||||
b = document.createElement( "strong" );
|
||||
b.innerHTML = this.nameHtml + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
|
||||
|
||||
addEvent(b, "click", function() {
|
||||
var next = b.parentNode.lastChild,
|
||||
collapsed = hasClass( next, "qunit-collapsed" );
|
||||
( collapsed ? removeClass : addClass )( next, "qunit-collapsed" );
|
||||
});
|
||||
|
||||
addEvent(b, "dblclick", function( e ) {
|
||||
var target = e && e.target ? e.target : window.event.srcElement;
|
||||
if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
|
||||
target = target.parentNode;
|
||||
}
|
||||
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
|
||||
window.location = QUnit.url({ testNumber: test.testNumber });
|
||||
}
|
||||
});
|
||||
|
||||
// `time` initialized at top of scope
|
||||
time = document.createElement( "span" );
|
||||
time.className = "runtime";
|
||||
time.innerHTML = this.runtime + " ms";
|
||||
|
||||
// `li` initialized at top of scope
|
||||
li = id( this.id );
|
||||
li.className = bad ? "fail" : "pass";
|
||||
li.removeChild( li.firstChild );
|
||||
a = li.firstChild;
|
||||
li.appendChild( b );
|
||||
li.appendChild( a );
|
||||
li.appendChild( time );
|
||||
li.appendChild( ol );
|
||||
|
||||
} else {
|
||||
for ( i = 0; i < this.assertions.length; i++ ) {
|
||||
if ( !this.assertions[i].result ) {
|
||||
bad++;
|
||||
config.stats.bad++;
|
||||
config.moduleStats.bad++;
|
||||
}
|
||||
for ( i = 0; i < this.assertions.length; i++ ) {
|
||||
if ( !this.assertions[ i ].result ) {
|
||||
bad++;
|
||||
config.stats.bad++;
|
||||
config.moduleStats.bad++;
|
||||
}
|
||||
}
|
||||
|
||||
runLoggingCallbacks( "testDone", QUnit, {
|
||||
runLoggingCallbacks( "testDone", {
|
||||
name: this.testName,
|
||||
module: this.module,
|
||||
failed: bad,
|
||||
passed: this.assertions.length - bad,
|
||||
total: this.assertions.length,
|
||||
runtime: this.runtime,
|
||||
|
||||
// HTML Reporter use
|
||||
assertions: this.assertions,
|
||||
testNumber: this.testNumber,
|
||||
|
||||
// DEPRECATED: this property will be removed in 2.0.0, use runtime instead
|
||||
duration: this.runtime
|
||||
});
|
||||
|
||||
QUnit.reset();
|
||||
|
||||
config.current = undefined;
|
||||
},
|
||||
|
||||
@ -1451,9 +868,6 @@ Test.prototype = {
|
||||
var bad,
|
||||
test = this;
|
||||
|
||||
synchronize(function() {
|
||||
test.init();
|
||||
});
|
||||
function run() {
|
||||
// each of these can by async
|
||||
synchronize(function() {
|
||||
@ -1473,59 +887,129 @@ Test.prototype = {
|
||||
// `bad` initialized at top of scope
|
||||
// defer when previous test run passed, if storage is available
|
||||
bad = QUnit.config.reorder && defined.sessionStorage &&
|
||||
+sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
|
||||
+sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
|
||||
|
||||
if ( bad ) {
|
||||
run();
|
||||
} else {
|
||||
synchronize( run, true );
|
||||
}
|
||||
},
|
||||
|
||||
push: function( result, actual, expected, message ) {
|
||||
var source,
|
||||
details = {
|
||||
module: this.module,
|
||||
name: this.testName,
|
||||
result: result,
|
||||
message: message,
|
||||
actual: actual,
|
||||
expected: expected,
|
||||
testNumber: this.testNumber
|
||||
};
|
||||
|
||||
if ( !result ) {
|
||||
source = sourceFromStacktrace();
|
||||
|
||||
if ( source ) {
|
||||
details.source = source;
|
||||
}
|
||||
}
|
||||
|
||||
runLoggingCallbacks( "log", details );
|
||||
|
||||
this.assertions.push({
|
||||
result: !!result,
|
||||
message: message
|
||||
});
|
||||
},
|
||||
|
||||
pushFailure: function( message, source, actual ) {
|
||||
if ( !this instanceof Test ) {
|
||||
throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace( 2 ) );
|
||||
}
|
||||
|
||||
var details = {
|
||||
module: this.module,
|
||||
name: this.testName,
|
||||
result: false,
|
||||
message: message || "error",
|
||||
actual: actual || null,
|
||||
testNumber: this.testNumber
|
||||
};
|
||||
|
||||
if ( source ) {
|
||||
details.source = source;
|
||||
}
|
||||
|
||||
runLoggingCallbacks( "log", details );
|
||||
|
||||
this.assertions.push({
|
||||
result: false,
|
||||
message: message
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// `assert` initialized at top of scope
|
||||
QUnit.pushFailure = function() {
|
||||
if ( !QUnit.config.current ) {
|
||||
throw new Error( "pushFailure() assertion outside test context, in " + sourceFromStacktrace( 2 ) );
|
||||
}
|
||||
|
||||
// Gets current test obj
|
||||
var currentTest = QUnit.config.current.assert.test;
|
||||
|
||||
return currentTest.pushFailure.apply( currentTest, arguments );
|
||||
};
|
||||
|
||||
function Assert( testContext ) {
|
||||
this.test = testContext;
|
||||
}
|
||||
|
||||
// Assert helpers
|
||||
// All of these must either call QUnit.push() or manually do:
|
||||
// - runLoggingCallbacks( "log", .. );
|
||||
// - config.current.assertions.push({ .. });
|
||||
assert = QUnit.assert = {
|
||||
QUnit.assert = Assert.prototype = {
|
||||
|
||||
// Specify the number of expected assertions to guarantee that failed test (no assertions are run at all) don't slip through.
|
||||
expect: function( asserts ) {
|
||||
if ( arguments.length === 1 ) {
|
||||
this.test.expected = asserts;
|
||||
} else {
|
||||
return this.test.expected;
|
||||
}
|
||||
},
|
||||
|
||||
// Exports test.push() to the user API
|
||||
push: function() {
|
||||
var assert = this;
|
||||
|
||||
// Backwards compatibility fix.
|
||||
// Allows the direct use of global exported assertions and QUnit.assert.*
|
||||
// Although, it's use is not recommended as it can leak assertions
|
||||
// to other tests from async tests, because we only get a reference to the current test,
|
||||
// not exactly the test where assertion were intended to be called.
|
||||
if ( !QUnit.config.current ) {
|
||||
throw new Error( "assertion outside test context, in " + sourceFromStacktrace( 2 ) );
|
||||
}
|
||||
if ( !( assert instanceof Assert ) ) {
|
||||
assert = QUnit.config.current.assert;
|
||||
}
|
||||
return assert.test.push.apply( assert.test, arguments );
|
||||
},
|
||||
|
||||
/**
|
||||
* Asserts rough true-ish result.
|
||||
* @name ok
|
||||
* @function
|
||||
* @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
|
||||
*/
|
||||
ok: function( result, msg ) {
|
||||
if ( !config.current ) {
|
||||
throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) );
|
||||
ok: function( result, message ) {
|
||||
message = message || ( result ? "okay" : "failed, expected argument to be truthy, was: " +
|
||||
QUnit.dump.parse( result ) );
|
||||
if ( !!result ) {
|
||||
this.push( true, result, true, message );
|
||||
} else {
|
||||
this.test.pushFailure( message, null, result );
|
||||
}
|
||||
result = !!result;
|
||||
msg = msg || ( result ? "okay" : "failed" );
|
||||
|
||||
var source,
|
||||
details = {
|
||||
module: config.current.module,
|
||||
name: config.current.testName,
|
||||
result: result,
|
||||
message: msg
|
||||
};
|
||||
|
||||
msg = "<span class='test-message'>" + escapeText( msg ) + "</span>";
|
||||
|
||||
if ( !result ) {
|
||||
source = sourceFromStacktrace( 2 );
|
||||
if ( source ) {
|
||||
details.source = source;
|
||||
msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" +
|
||||
escapeText( source ) +
|
||||
"</pre></td></tr></table>";
|
||||
}
|
||||
}
|
||||
runLoggingCallbacks( "log", QUnit, details );
|
||||
config.current.assertions.push({
|
||||
result: result,
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1537,7 +1021,7 @@ assert = QUnit.assert = {
|
||||
*/
|
||||
equal: function( actual, expected, message ) {
|
||||
/*jshint eqeqeq:false */
|
||||
QUnit.push( expected == actual, actual, expected, message );
|
||||
this.push( expected == actual, actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1546,7 +1030,7 @@ assert = QUnit.assert = {
|
||||
*/
|
||||
notEqual: function( actual, expected, message ) {
|
||||
/*jshint eqeqeq:false */
|
||||
QUnit.push( expected != actual, actual, expected, message );
|
||||
this.push( expected != actual, actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1554,9 +1038,9 @@ assert = QUnit.assert = {
|
||||
* @function
|
||||
*/
|
||||
propEqual: function( actual, expected, message ) {
|
||||
actual = objectValues(actual);
|
||||
expected = objectValues(expected);
|
||||
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
|
||||
actual = objectValues( actual );
|
||||
expected = objectValues( expected );
|
||||
this.push( QUnit.equiv( actual, expected ), actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1564,9 +1048,9 @@ assert = QUnit.assert = {
|
||||
* @function
|
||||
*/
|
||||
notPropEqual: function( actual, expected, message ) {
|
||||
actual = objectValues(actual);
|
||||
expected = objectValues(expected);
|
||||
QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
|
||||
actual = objectValues( actual );
|
||||
expected = objectValues( expected );
|
||||
this.push( !QUnit.equiv( actual, expected ), actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1574,7 +1058,7 @@ assert = QUnit.assert = {
|
||||
* @function
|
||||
*/
|
||||
deepEqual: function( actual, expected, message ) {
|
||||
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
|
||||
this.push( QUnit.equiv( actual, expected ), actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1582,7 +1066,7 @@ assert = QUnit.assert = {
|
||||
* @function
|
||||
*/
|
||||
notDeepEqual: function( actual, expected, message ) {
|
||||
QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
|
||||
this.push( !QUnit.equiv( actual, expected ), actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1590,7 +1074,7 @@ assert = QUnit.assert = {
|
||||
* @function
|
||||
*/
|
||||
strictEqual: function( actual, expected, message ) {
|
||||
QUnit.push( expected === actual, actual, expected, message );
|
||||
this.push( expected === actual, actual, expected, message );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1598,91 +1082,67 @@ assert = QUnit.assert = {
|
||||
* @function
|
||||
*/
|
||||
notStrictEqual: function( actual, expected, message ) {
|
||||
QUnit.push( expected !== actual, actual, expected, message );
|
||||
this.push( expected !== actual, actual, expected, message );
|
||||
},
|
||||
|
||||
"throws": function( block, expected, message ) {
|
||||
var actual,
|
||||
var actual, expectedType,
|
||||
expectedOutput = expected,
|
||||
ok = false;
|
||||
|
||||
// 'expected' is optional
|
||||
if ( !message && typeof expected === "string" ) {
|
||||
// 'expected' is optional unless doing string comparison
|
||||
if ( message == null && typeof expected === "string" ) {
|
||||
message = expected;
|
||||
expected = null;
|
||||
}
|
||||
|
||||
config.current.ignoreGlobalErrors = true;
|
||||
this.test.ignoreGlobalErrors = true;
|
||||
try {
|
||||
block.call( config.current.testEnvironment );
|
||||
block.call( this.test.testEnvironment );
|
||||
} catch (e) {
|
||||
actual = e;
|
||||
}
|
||||
config.current.ignoreGlobalErrors = false;
|
||||
this.test.ignoreGlobalErrors = false;
|
||||
|
||||
if ( actual ) {
|
||||
expectedType = QUnit.objectType( expected );
|
||||
|
||||
// we don't want to validate thrown error
|
||||
if ( !expected ) {
|
||||
ok = true;
|
||||
expectedOutput = null;
|
||||
|
||||
// expected is an Error object
|
||||
} else if ( expected instanceof Error ) {
|
||||
ok = actual instanceof Error &&
|
||||
actual.name === expected.name &&
|
||||
actual.message === expected.message;
|
||||
|
||||
// expected is a regexp
|
||||
} else if ( QUnit.objectType( expected ) === "regexp" ) {
|
||||
} else if ( expectedType === "regexp" ) {
|
||||
ok = expected.test( errorString( actual ) );
|
||||
|
||||
// expected is a string
|
||||
} else if ( QUnit.objectType( expected ) === "string" ) {
|
||||
} else if ( expectedType === "string" ) {
|
||||
ok = expected === errorString( actual );
|
||||
|
||||
// expected is a constructor
|
||||
} else if ( actual instanceof expected ) {
|
||||
// expected is a constructor, maybe an Error constructor
|
||||
} else if ( expectedType === "function" && actual instanceof expected ) {
|
||||
ok = true;
|
||||
|
||||
// expected is a validation function which returns true is validation passed
|
||||
} else if ( expected.call( {}, actual ) === true ) {
|
||||
// expected is an Error object
|
||||
} else if ( expectedType === "object" ) {
|
||||
ok = actual instanceof expected.constructor &&
|
||||
actual.name === expected.name &&
|
||||
actual.message === expected.message;
|
||||
|
||||
// expected is a validation function which returns true if validation passed
|
||||
} else if ( expectedType === "function" && expected.call( {}, actual ) === true ) {
|
||||
expectedOutput = null;
|
||||
ok = true;
|
||||
}
|
||||
|
||||
QUnit.push( ok, actual, expectedOutput, message );
|
||||
this.push( ok, actual, expectedOutput, message );
|
||||
} else {
|
||||
QUnit.pushFailure( message, null, "No exception was thrown." );
|
||||
this.test.pushFailure( message, null, "No exception was thrown." );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated since 1.8.0
|
||||
* Kept assertion helpers in root for backwards compatibility.
|
||||
*/
|
||||
extend( QUnit.constructor.prototype, assert );
|
||||
|
||||
/**
|
||||
* @deprecated since 1.9.0
|
||||
* Kept to avoid TypeErrors for undefined methods.
|
||||
*/
|
||||
QUnit.constructor.prototype.raises = function() {
|
||||
QUnit.push( false, false, false, "QUnit.raises has been deprecated since 2012 (fad3c1ea), use QUnit.throws instead" );
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated since 1.0.0, replaced with error pushes since 1.3.0
|
||||
* Kept to avoid TypeErrors for undefined methods.
|
||||
*/
|
||||
QUnit.constructor.prototype.equals = function() {
|
||||
QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" );
|
||||
};
|
||||
QUnit.constructor.prototype.same = function() {
|
||||
QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" );
|
||||
};
|
||||
|
||||
// Test for equality any JavaScript type.
|
||||
// Author: Philippe Rathé <prathe@gmail.com>
|
||||
QUnit.equiv = (function() {
|
||||
@ -1701,22 +1161,26 @@ QUnit.equiv = (function() {
|
||||
|
||||
// the real equiv function
|
||||
var innerEquiv,
|
||||
|
||||
// stack to decide between skip/abort functions
|
||||
callers = [],
|
||||
|
||||
// stack to avoiding loops from circular referencing
|
||||
parents = [],
|
||||
parentsB = [],
|
||||
|
||||
getProto = Object.getPrototypeOf || function ( obj ) {
|
||||
/*jshint camelcase:false */
|
||||
getProto = Object.getPrototypeOf || function( obj ) {
|
||||
/* jshint camelcase: false, proto: true */
|
||||
return obj.__proto__;
|
||||
},
|
||||
callbacks = (function () {
|
||||
callbacks = (function() {
|
||||
|
||||
// for string, boolean, number and null
|
||||
function useStrictEquality( b, a ) {
|
||||
|
||||
/*jshint eqeqeq:false */
|
||||
if ( b instanceof a.constructor || a instanceof b.constructor ) {
|
||||
|
||||
// to catch short annotation VS 'new' annotation of a
|
||||
// declaration
|
||||
// e.g. var i = 1;
|
||||
@ -1744,10 +1208,13 @@ QUnit.equiv = (function() {
|
||||
|
||||
"regexp": function( b, a ) {
|
||||
return QUnit.objectType( b ) === "regexp" &&
|
||||
|
||||
// the regex itself
|
||||
a.source === b.source &&
|
||||
|
||||
// and its modifiers
|
||||
a.global === b.global &&
|
||||
|
||||
// (gmi) ...
|
||||
a.ignoreCase === b.ignoreCase &&
|
||||
a.multiline === b.multiline &&
|
||||
@ -1758,7 +1225,7 @@ QUnit.equiv = (function() {
|
||||
// - abort otherwise,
|
||||
// initial === would have catch identical references anyway
|
||||
"function": function() {
|
||||
var caller = callers[callers.length - 1];
|
||||
var caller = callers[ callers.length - 1 ];
|
||||
return caller !== Object && typeof caller !== "undefined";
|
||||
},
|
||||
|
||||
@ -1782,10 +1249,10 @@ QUnit.equiv = (function() {
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
loop = false;
|
||||
for ( j = 0; j < parents.length; j++ ) {
|
||||
aCircular = parents[j] === a[i];
|
||||
bCircular = parentsB[j] === b[i];
|
||||
aCircular = parents[ j ] === a[ i ];
|
||||
bCircular = parentsB[ j ] === b[ i ];
|
||||
if ( aCircular || bCircular ) {
|
||||
if ( a[i] === b[i] || aCircular && bCircular ) {
|
||||
if ( a[ i ] === b[ i ] || aCircular && bCircular ) {
|
||||
loop = true;
|
||||
} else {
|
||||
parents.pop();
|
||||
@ -1794,7 +1261,7 @@ QUnit.equiv = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !loop && !innerEquiv(a[i], b[i]) ) {
|
||||
if ( !loop && !innerEquiv( a[ i ], b[ i ] ) ) {
|
||||
parents.pop();
|
||||
parentsB.pop();
|
||||
return false;
|
||||
@ -1806,6 +1273,7 @@ QUnit.equiv = (function() {
|
||||
},
|
||||
|
||||
"object": function( b, a ) {
|
||||
|
||||
/*jshint forin:false */
|
||||
var i, j, loop, aCircular, bCircular,
|
||||
// Default to true
|
||||
@ -1816,11 +1284,12 @@ QUnit.equiv = (function() {
|
||||
// comparing constructors is more strict than using
|
||||
// instanceof
|
||||
if ( a.constructor !== b.constructor ) {
|
||||
|
||||
// Allow objects with no prototype to be equivalent to
|
||||
// objects with Object as their constructor.
|
||||
if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) ||
|
||||
( getProto(b) === null && getProto(a) === Object.prototype ) ) ) {
|
||||
return false;
|
||||
if ( !( ( getProto( a ) === null && getProto( b ) === Object.prototype ) ||
|
||||
( getProto( b ) === null && getProto( a ) === Object.prototype ) ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1835,10 +1304,10 @@ QUnit.equiv = (function() {
|
||||
for ( i in a ) {
|
||||
loop = false;
|
||||
for ( j = 0; j < parents.length; j++ ) {
|
||||
aCircular = parents[j] === a[i];
|
||||
bCircular = parentsB[j] === b[i];
|
||||
aCircular = parents[ j ] === a[ i ];
|
||||
bCircular = parentsB[ j ] === b[ i ];
|
||||
if ( aCircular || bCircular ) {
|
||||
if ( a[i] === b[i] || aCircular && bCircular ) {
|
||||
if ( a[ i ] === b[ i ] || aCircular && bCircular ) {
|
||||
loop = true;
|
||||
} else {
|
||||
eq = false;
|
||||
@ -1846,8 +1315,8 @@ QUnit.equiv = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
aProperties.push(i);
|
||||
if ( !loop && !innerEquiv(a[i], b[i]) ) {
|
||||
aProperties.push( i );
|
||||
if ( !loop && !innerEquiv( a[ i ], b[ i ] ) ) {
|
||||
eq = false;
|
||||
break;
|
||||
}
|
||||
@ -1873,35 +1342,29 @@ QUnit.equiv = (function() {
|
||||
return true; // end transition
|
||||
}
|
||||
|
||||
return (function( a, b ) {
|
||||
return ( (function( a, b ) {
|
||||
if ( a === b ) {
|
||||
return true; // catch the most you can
|
||||
} else if ( a === null || b === null || typeof a === "undefined" ||
|
||||
typeof b === "undefined" ||
|
||||
QUnit.objectType(a) !== QUnit.objectType(b) ) {
|
||||
return false; // don't lose time with error prone cases
|
||||
QUnit.objectType( a ) !== QUnit.objectType( b ) ) {
|
||||
|
||||
// don't lose time with error prone cases
|
||||
return false;
|
||||
} else {
|
||||
return bindCallbacks(a, callbacks, [ b, a ]);
|
||||
return bindCallbacks( a, callbacks, [ b, a ] );
|
||||
}
|
||||
|
||||
// apply transition with (1..n) arguments
|
||||
}( args[0], args[1] ) && innerEquiv.apply( this, args.splice(1, args.length - 1 )) );
|
||||
}( args[ 0 ], args[ 1 ] ) ) && innerEquiv.apply( this, args.splice( 1, args.length - 1 ) ) );
|
||||
};
|
||||
|
||||
return innerEquiv;
|
||||
}());
|
||||
|
||||
/**
|
||||
* jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
|
||||
* http://flesler.blogspot.com Licensed under BSD
|
||||
* (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
|
||||
*
|
||||
* @projectDescription Advanced and extensible data dumping for Javascript.
|
||||
* @version 1.0.0
|
||||
* @author Ariel Flesler
|
||||
* @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
|
||||
*/
|
||||
QUnit.jsDump = (function() {
|
||||
// Based on jsDump by Ariel Flesler
|
||||
// http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html
|
||||
QUnit.dump = (function() {
|
||||
function quote( str ) {
|
||||
return "\"" + str.toString().replace( /"/g, "\\\"" ) + "\"";
|
||||
}
|
||||
@ -1909,42 +1372,43 @@ QUnit.jsDump = (function() {
|
||||
return o + "";
|
||||
}
|
||||
function join( pre, arr, post ) {
|
||||
var s = jsDump.separator(),
|
||||
base = jsDump.indent(),
|
||||
inner = jsDump.indent(1);
|
||||
var s = dump.separator(),
|
||||
base = dump.indent(),
|
||||
inner = dump.indent( 1 );
|
||||
if ( arr.join ) {
|
||||
arr = arr.join( "," + s + inner );
|
||||
}
|
||||
if ( !arr ) {
|
||||
return pre + post;
|
||||
}
|
||||
return [ pre, inner + arr, base + post ].join(s);
|
||||
return [ pre, inner + arr, base + post ].join( s );
|
||||
}
|
||||
function array( arr, stack ) {
|
||||
var i = arr.length, ret = new Array(i);
|
||||
var i = arr.length,
|
||||
ret = new Array( i );
|
||||
this.up();
|
||||
while ( i-- ) {
|
||||
ret[i] = this.parse( arr[i] , undefined , stack);
|
||||
ret[ i ] = this.parse( arr[ i ], undefined, stack );
|
||||
}
|
||||
this.down();
|
||||
return join( "[", ret, "]" );
|
||||
}
|
||||
|
||||
var reName = /^function (\w+)/,
|
||||
jsDump = {
|
||||
dump = {
|
||||
// type is used mostly internally, you can fix a (custom)type in advance
|
||||
parse: function( obj, type, stack ) {
|
||||
stack = stack || [ ];
|
||||
stack = stack || [];
|
||||
var inStack, res,
|
||||
parser = this.parsers[ type || this.typeOf(obj) ];
|
||||
parser = this.parsers[ type || this.typeOf( obj ) ];
|
||||
|
||||
type = typeof parser;
|
||||
inStack = inArray( obj, stack );
|
||||
|
||||
if ( inStack !== -1 ) {
|
||||
return "recursion(" + (inStack - stack.length) + ")";
|
||||
return "recursion(" + ( inStack - stack.length ) + ")";
|
||||
}
|
||||
if ( type === "function" ) {
|
||||
if ( type === "function" ) {
|
||||
stack.push( obj );
|
||||
res = parser.call( this, obj, stack );
|
||||
stack.pop();
|
||||
@ -1958,11 +1422,11 @@ QUnit.jsDump = (function() {
|
||||
type = "null";
|
||||
} else if ( typeof obj === "undefined" ) {
|
||||
type = "undefined";
|
||||
} else if ( QUnit.is( "regexp", obj) ) {
|
||||
} else if ( QUnit.is( "regexp", obj ) ) {
|
||||
type = "regexp";
|
||||
} else if ( QUnit.is( "date", obj) ) {
|
||||
} else if ( QUnit.is( "date", obj ) ) {
|
||||
type = "date";
|
||||
} else if ( QUnit.is( "function", obj) ) {
|
||||
} else if ( QUnit.is( "function", obj ) ) {
|
||||
type = "function";
|
||||
} else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) {
|
||||
type = "window";
|
||||
@ -1971,10 +1435,12 @@ QUnit.jsDump = (function() {
|
||||
} else if ( obj.nodeType ) {
|
||||
type = "node";
|
||||
} else if (
|
||||
|
||||
// native arrays
|
||||
toString.call( obj ) === "[object Array]" ||
|
||||
|
||||
// NodeList objects
|
||||
( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
|
||||
( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item( 0 ) === obj[ 0 ] : ( obj.item( 0 ) === null && typeof obj[ 0 ] === "undefined" ) ) )
|
||||
) {
|
||||
type = "array";
|
||||
} else if ( obj.constructor === Error.prototype.constructor ) {
|
||||
@ -1985,7 +1451,7 @@ QUnit.jsDump = (function() {
|
||||
return type;
|
||||
},
|
||||
separator: function() {
|
||||
return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
|
||||
return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
|
||||
},
|
||||
// extra can be a number, shortcut for increasing-calling-decreasing
|
||||
indent: function( extra ) {
|
||||
@ -1996,7 +1462,7 @@ QUnit.jsDump = (function() {
|
||||
if ( this.HTML ) {
|
||||
chr = chr.replace( /\t/g, " " ).replace( / /g, " " );
|
||||
}
|
||||
return new Array( this.depth + ( extra || 0 ) ).join(chr);
|
||||
return new Array( this.depth + ( extra || 0 ) ).join( chr );
|
||||
},
|
||||
up: function( a ) {
|
||||
this.depth += a || 1;
|
||||
@ -2005,7 +1471,7 @@ QUnit.jsDump = (function() {
|
||||
this.depth -= a || 1;
|
||||
},
|
||||
setParser: function( name, parser ) {
|
||||
this.parsers[name] = parser;
|
||||
this.parsers[ name ] = parser;
|
||||
},
|
||||
// The next 3 are exposed so you can use them
|
||||
quote: quote,
|
||||
@ -2013,11 +1479,11 @@ QUnit.jsDump = (function() {
|
||||
join: join,
|
||||
//
|
||||
depth: 1,
|
||||
// This is the list of parsers, to modify them, use jsDump.setParser
|
||||
// This is the list of parsers, to modify them, use dump.setParser
|
||||
parsers: {
|
||||
window: "[Window]",
|
||||
document: "[Document]",
|
||||
error: function(error) {
|
||||
error: function( error ) {
|
||||
return "Error(\"" + error.message + "\")";
|
||||
},
|
||||
unknown: "[Unknown]",
|
||||
@ -2026,51 +1492,61 @@ QUnit.jsDump = (function() {
|
||||
"function": function( fn ) {
|
||||
var ret = "function",
|
||||
// functions never have name in IE
|
||||
name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];
|
||||
name = "name" in fn ? fn.name : ( reName.exec( fn ) || [] )[ 1 ];
|
||||
|
||||
if ( name ) {
|
||||
ret += " " + name;
|
||||
}
|
||||
ret += "( ";
|
||||
|
||||
ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" );
|
||||
return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" );
|
||||
ret = [ ret, dump.parse( fn, "functionArgs" ), "){" ].join( "" );
|
||||
return join( ret, dump.parse( fn, "functionCode" ), "}" );
|
||||
},
|
||||
array: array,
|
||||
nodelist: array,
|
||||
"arguments": array,
|
||||
object: function( map, stack ) {
|
||||
/*jshint forin:false */
|
||||
var ret = [ ], keys, key, val, i;
|
||||
QUnit.jsDump.up();
|
||||
var ret = [], keys, key, val, i, nonEnumerableProperties;
|
||||
dump.up();
|
||||
keys = [];
|
||||
for ( key in map ) {
|
||||
keys.push( key );
|
||||
}
|
||||
|
||||
// Some properties are not always enumerable on Error objects.
|
||||
nonEnumerableProperties = [ "message", "name" ];
|
||||
for ( i in nonEnumerableProperties ) {
|
||||
key = nonEnumerableProperties[ i ];
|
||||
if ( key in map && !( key in keys ) ) {
|
||||
keys.push( key );
|
||||
}
|
||||
}
|
||||
keys.sort();
|
||||
for ( i = 0; i < keys.length; i++ ) {
|
||||
key = keys[ i ];
|
||||
val = map[ key ];
|
||||
ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) );
|
||||
ret.push( dump.parse( key, "key" ) + ": " + dump.parse( val, undefined, stack ) );
|
||||
}
|
||||
QUnit.jsDump.down();
|
||||
dump.down();
|
||||
return join( "{", ret, "}" );
|
||||
},
|
||||
node: function( node ) {
|
||||
var len, i, val,
|
||||
open = QUnit.jsDump.HTML ? "<" : "<",
|
||||
close = QUnit.jsDump.HTML ? ">" : ">",
|
||||
open = dump.HTML ? "<" : "<",
|
||||
close = dump.HTML ? ">" : ">",
|
||||
tag = node.nodeName.toLowerCase(),
|
||||
ret = open + tag,
|
||||
attrs = node.attributes;
|
||||
|
||||
if ( attrs ) {
|
||||
for ( i = 0, len = attrs.length; i < len; i++ ) {
|
||||
val = attrs[i].nodeValue;
|
||||
val = attrs[ i ].nodeValue;
|
||||
|
||||
// IE6 includes all attributes in .attributes, even ones not explicitly set.
|
||||
// Those have values like undefined, null, 0, false, "" or "inherit".
|
||||
if ( val && val !== "inherit" ) {
|
||||
ret += " " + attrs[i].nodeName + "=" + QUnit.jsDump.parse( val, "attribute" );
|
||||
ret += " " + attrs[ i ].nodeName + "=" + dump.parse( val, "attribute" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2083,6 +1559,7 @@ QUnit.jsDump = (function() {
|
||||
|
||||
return ret + open + "/" + tag + close;
|
||||
},
|
||||
|
||||
// function calls it internally, it's the arguments part of the function
|
||||
functionArgs: function( fn ) {
|
||||
var args,
|
||||
@ -2092,10 +1569,11 @@ QUnit.jsDump = (function() {
|
||||
return "";
|
||||
}
|
||||
|
||||
args = new Array(l);
|
||||
args = new Array( l );
|
||||
while ( l-- ) {
|
||||
|
||||
// 97 is 'a'
|
||||
args[l] = String.fromCharCode(97+l);
|
||||
args[ l ] = String.fromCharCode( 97 + l );
|
||||
}
|
||||
return " " + args.join( ", " ) + " ";
|
||||
},
|
||||
@ -2119,9 +1597,73 @@ QUnit.jsDump = (function() {
|
||||
multiline: true
|
||||
};
|
||||
|
||||
return jsDump;
|
||||
return dump;
|
||||
}());
|
||||
|
||||
// back compat
|
||||
QUnit.jsDump = QUnit.dump;
|
||||
|
||||
// For browser, export only select globals
|
||||
if ( typeof window !== "undefined" ) {
|
||||
|
||||
// Deprecated
|
||||
// Extend assert methods to QUnit and Global scope through Backwards compatibility
|
||||
(function() {
|
||||
var i,
|
||||
assertions = Assert.prototype;
|
||||
|
||||
function applyCurrent( current ) {
|
||||
return function() {
|
||||
var assert = new Assert( QUnit.config.current );
|
||||
current.apply( assert, arguments );
|
||||
};
|
||||
}
|
||||
|
||||
for ( i in assertions ) {
|
||||
QUnit[ i ] = applyCurrent( assertions[ i ] );
|
||||
}
|
||||
})();
|
||||
|
||||
(function() {
|
||||
var i, l,
|
||||
keys = [
|
||||
"test",
|
||||
"module",
|
||||
"expect",
|
||||
"asyncTest",
|
||||
"start",
|
||||
"stop",
|
||||
"ok",
|
||||
"equal",
|
||||
"notEqual",
|
||||
"propEqual",
|
||||
"notPropEqual",
|
||||
"deepEqual",
|
||||
"notDeepEqual",
|
||||
"strictEqual",
|
||||
"notStrictEqual",
|
||||
"throws"
|
||||
];
|
||||
|
||||
for ( i = 0, l = keys.length; i < l; i++ ) {
|
||||
window[ keys[ i ] ] = QUnit[ keys[ i ] ];
|
||||
}
|
||||
})();
|
||||
|
||||
window.QUnit = QUnit;
|
||||
}
|
||||
|
||||
// For CommonJS environments, export everything
|
||||
if ( typeof module !== "undefined" && module.exports ) {
|
||||
module.exports = QUnit;
|
||||
}
|
||||
|
||||
// Get a reference to the global object, like window in browsers
|
||||
}( (function() {
|
||||
return this;
|
||||
})() ));
|
||||
|
||||
/*istanbul ignore next */
|
||||
/*
|
||||
* Javascript Diff Algorithm
|
||||
* By John Resig (http://ejohn.org/)
|
||||
@ -2137,6 +1679,8 @@ QUnit.jsDump = (function() {
|
||||
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
|
||||
*/
|
||||
QUnit.diff = (function() {
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
|
||||
/*jshint eqeqeq:false, eqnull:true */
|
||||
function diff( o, n ) {
|
||||
var i,
|
||||
@ -2144,65 +1688,65 @@ QUnit.diff = (function() {
|
||||
os = {};
|
||||
|
||||
for ( i = 0; i < n.length; i++ ) {
|
||||
if ( !hasOwn.call( ns, n[i] ) ) {
|
||||
ns[ n[i] ] = {
|
||||
if ( !hasOwn.call( ns, n[ i ] ) ) {
|
||||
ns[ n[ i ] ] = {
|
||||
rows: [],
|
||||
o: null
|
||||
};
|
||||
}
|
||||
ns[ n[i] ].rows.push( i );
|
||||
ns[ n[ i ] ].rows.push( i );
|
||||
}
|
||||
|
||||
for ( i = 0; i < o.length; i++ ) {
|
||||
if ( !hasOwn.call( os, o[i] ) ) {
|
||||
os[ o[i] ] = {
|
||||
if ( !hasOwn.call( os, o[ i ] ) ) {
|
||||
os[ o[ i ] ] = {
|
||||
rows: [],
|
||||
n: null
|
||||
};
|
||||
}
|
||||
os[ o[i] ].rows.push( i );
|
||||
os[ o[ i ] ].rows.push( i );
|
||||
}
|
||||
|
||||
for ( i in ns ) {
|
||||
if ( hasOwn.call( ns, i ) ) {
|
||||
if ( ns[i].rows.length === 1 && hasOwn.call( os, i ) && os[i].rows.length === 1 ) {
|
||||
n[ ns[i].rows[0] ] = {
|
||||
text: n[ ns[i].rows[0] ],
|
||||
row: os[i].rows[0]
|
||||
if ( ns[ i ].rows.length === 1 && hasOwn.call( os, i ) && os[ i ].rows.length === 1 ) {
|
||||
n[ ns[ i ].rows[ 0 ] ] = {
|
||||
text: n[ ns[ i ].rows[ 0 ] ],
|
||||
row: os[ i ].rows[ 0 ]
|
||||
};
|
||||
o[ os[i].rows[0] ] = {
|
||||
text: o[ os[i].rows[0] ],
|
||||
row: ns[i].rows[0]
|
||||
o[ os[ i ].rows[ 0 ] ] = {
|
||||
text: o[ os[ i ].rows[ 0 ] ],
|
||||
row: ns[ i ].rows[ 0 ]
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0; i < n.length - 1; i++ ) {
|
||||
if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
|
||||
n[ i + 1 ] == o[ n[i].row + 1 ] ) {
|
||||
if ( n[ i ].text != null && n[ i + 1 ].text == null && n[ i ].row + 1 < o.length && o[ n[ i ].row + 1 ].text == null &&
|
||||
n[ i + 1 ] == o[ n[ i ].row + 1 ] ) {
|
||||
|
||||
n[ i + 1 ] = {
|
||||
text: n[ i + 1 ],
|
||||
row: n[i].row + 1
|
||||
row: n[ i ].row + 1
|
||||
};
|
||||
o[ n[i].row + 1 ] = {
|
||||
text: o[ n[i].row + 1 ],
|
||||
o[ n[ i ].row + 1 ] = {
|
||||
text: o[ n[ i ].row + 1 ],
|
||||
row: i + 1
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = n.length - 1; i > 0; i-- ) {
|
||||
if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
|
||||
n[ i - 1 ] == o[ n[i].row - 1 ]) {
|
||||
if ( n[ i ].text != null && n[ i - 1 ].text == null && n[ i ].row > 0 && o[ n[ i ].row - 1 ].text == null &&
|
||||
n[ i - 1 ] == o[ n[ i ].row - 1 ] ) {
|
||||
|
||||
n[ i - 1 ] = {
|
||||
text: n[ i - 1 ],
|
||||
row: n[i].row - 1
|
||||
row: n[ i ].row - 1
|
||||
};
|
||||
o[ n[i].row - 1 ] = {
|
||||
text: o[ n[i].row - 1 ],
|
||||
o[ n[ i ].row - 1 ] = {
|
||||
text: o[ n[ i ].row - 1 ],
|
||||
row: i - 1
|
||||
};
|
||||
}
|
||||
@ -2220,48 +1764,45 @@ QUnit.diff = (function() {
|
||||
|
||||
var i, pre,
|
||||
str = "",
|
||||
out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ),
|
||||
oSpace = o.match(/\s+/g),
|
||||
nSpace = n.match(/\s+/g);
|
||||
out = diff( o === "" ? [] : o.split( /\s+/ ), n === "" ? [] : n.split( /\s+/ ) ),
|
||||
oSpace = o.match( /\s+/g ),
|
||||
nSpace = n.match( /\s+/g );
|
||||
|
||||
if ( oSpace == null ) {
|
||||
oSpace = [ " " ];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
oSpace.push( " " );
|
||||
}
|
||||
|
||||
if ( nSpace == null ) {
|
||||
nSpace = [ " " ];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nSpace.push( " " );
|
||||
}
|
||||
|
||||
if ( out.n.length === 0 ) {
|
||||
for ( i = 0; i < out.o.length; i++ ) {
|
||||
str += "<del>" + out.o[i] + oSpace[i] + "</del>";
|
||||
str += "<del>" + out.o[ i ] + oSpace[ i ] + "</del>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( out.n[0].text == null ) {
|
||||
for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) {
|
||||
str += "<del>" + out.o[n] + oSpace[n] + "</del>";
|
||||
} else {
|
||||
if ( out.n[ 0 ].text == null ) {
|
||||
for ( n = 0; n < out.o.length && out.o[ n ].text == null; n++ ) {
|
||||
str += "<del>" + out.o[ n ] + oSpace[ n ] + "</del>";
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0; i < out.n.length; i++ ) {
|
||||
if (out.n[i].text == null) {
|
||||
str += "<ins>" + out.n[i] + nSpace[i] + "</ins>";
|
||||
}
|
||||
else {
|
||||
if ( out.n[ i ].text == null ) {
|
||||
str += "<ins>" + out.n[ i ] + nSpace[ i ] + "</ins>";
|
||||
} else {
|
||||
|
||||
// `pre` initialized at top of scope
|
||||
pre = "";
|
||||
|
||||
for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
|
||||
pre += "<del>" + out.o[n] + oSpace[n] + "</del>";
|
||||
for ( n = out.n[ i ].row + 1; n < out.o.length && out.o[ n ].text == null; n++ ) {
|
||||
pre += "<del>" + out.o[ n ] + oSpace[ n ] + "</del>";
|
||||
}
|
||||
str += " " + out.n[i].text + nSpace[i] + pre;
|
||||
str += " " + out.n[ i ].text + nSpace[ i ] + pre;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2270,19 +1811,685 @@ QUnit.diff = (function() {
|
||||
};
|
||||
}());
|
||||
|
||||
// For browser, export only select globals
|
||||
if ( typeof window !== "undefined" ) {
|
||||
extend( window, QUnit.constructor.prototype );
|
||||
window.QUnit = QUnit;
|
||||
(function() {
|
||||
|
||||
// Deprecated QUnit.init - Ref #530
|
||||
// Re-initialize the configuration options
|
||||
QUnit.init = function() {
|
||||
var tests, banner, result, qunit,
|
||||
config = QUnit.config;
|
||||
|
||||
config.stats = { all: 0, bad: 0 };
|
||||
config.moduleStats = { all: 0, bad: 0 };
|
||||
config.started = 0;
|
||||
config.updateRate = 1000;
|
||||
config.blocking = false;
|
||||
config.autostart = true;
|
||||
config.autorun = false;
|
||||
config.filter = "";
|
||||
config.queue = [];
|
||||
config.semaphore = 1;
|
||||
|
||||
// Return on non-browser environments
|
||||
// This is necessary to not break on node tests
|
||||
if ( typeof window === "undefined" ) {
|
||||
return;
|
||||
}
|
||||
|
||||
qunit = id( "qunit" );
|
||||
if ( qunit ) {
|
||||
qunit.innerHTML =
|
||||
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
||||
"<h2 id='qunit-banner'></h2>" +
|
||||
"<div id='qunit-testrunner-toolbar'></div>" +
|
||||
"<h2 id='qunit-userAgent'></h2>" +
|
||||
"<ol id='qunit-tests'></ol>";
|
||||
}
|
||||
|
||||
tests = id( "qunit-tests" );
|
||||
banner = id( "qunit-banner" );
|
||||
result = id( "qunit-testresult" );
|
||||
|
||||
if ( tests ) {
|
||||
tests.innerHTML = "";
|
||||
}
|
||||
|
||||
if ( banner ) {
|
||||
banner.className = "";
|
||||
}
|
||||
|
||||
if ( result ) {
|
||||
result.parentNode.removeChild( result );
|
||||
}
|
||||
|
||||
if ( tests ) {
|
||||
result = document.createElement( "p" );
|
||||
result.id = "qunit-testresult";
|
||||
result.className = "result";
|
||||
tests.parentNode.insertBefore( result, tests );
|
||||
result.innerHTML = "Running...<br/> ";
|
||||
}
|
||||
};
|
||||
|
||||
// Resets the test setup. Useful for tests that modify the DOM.
|
||||
/*
|
||||
DEPRECATED: Use multiple tests instead of resetting inside a test.
|
||||
Use testStart or testDone for custom cleanup.
|
||||
This method will throw an error in 2.0, and will be removed in 2.1
|
||||
*/
|
||||
QUnit.reset = function() {
|
||||
|
||||
// Return on non-browser environments
|
||||
// This is necessary to not break on node tests
|
||||
if ( typeof window === "undefined" ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var fixture = id( "qunit-fixture" );
|
||||
if ( fixture ) {
|
||||
fixture.innerHTML = config.fixture;
|
||||
}
|
||||
};
|
||||
|
||||
// Don't load the HTML Reporter on non-Browser environments
|
||||
if ( typeof window === "undefined" ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// For CommonJS environments, export everything
|
||||
if ( typeof module !== "undefined" && module.exports ) {
|
||||
module.exports = QUnit;
|
||||
var config = QUnit.config,
|
||||
hasOwn = Object.prototype.hasOwnProperty,
|
||||
defined = {
|
||||
document: typeof window.document !== "undefined",
|
||||
sessionStorage: (function() {
|
||||
var x = "qunit-test-string";
|
||||
try {
|
||||
sessionStorage.setItem( x, x );
|
||||
sessionStorage.removeItem( x );
|
||||
return true;
|
||||
} catch ( e ) {
|
||||
return false;
|
||||
}
|
||||
}())
|
||||
};
|
||||
|
||||
/**
|
||||
* Escape text for attribute or text content.
|
||||
*/
|
||||
function escapeText( s ) {
|
||||
if ( !s ) {
|
||||
return "";
|
||||
}
|
||||
s = s + "";
|
||||
|
||||
// Both single quotes and double quotes (for attributes)
|
||||
return s.replace( /['"<>&]/g, function( s ) {
|
||||
switch ( s ) {
|
||||
case "'":
|
||||
return "'";
|
||||
case "\"":
|
||||
return """;
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
case "&":
|
||||
return "&";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} elem
|
||||
* @param {string} type
|
||||
* @param {Function} fn
|
||||
*/
|
||||
function addEvent( elem, type, fn ) {
|
||||
if ( elem.addEventListener ) {
|
||||
|
||||
// Get a reference to the global object, like window in browsers
|
||||
}( (function() {
|
||||
return this;
|
||||
})() ));
|
||||
// Standards-based browsers
|
||||
elem.addEventListener( type, fn, false );
|
||||
} else if ( elem.attachEvent ) {
|
||||
|
||||
// support: IE <9
|
||||
elem.attachEvent( "on" + type, fn );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array|NodeList} elems
|
||||
* @param {string} type
|
||||
* @param {Function} fn
|
||||
*/
|
||||
function addEvents( elems, type, fn ) {
|
||||
var i = elems.length;
|
||||
while ( i-- ) {
|
||||
addEvent( elems[ i ], type, fn );
|
||||
}
|
||||
}
|
||||
|
||||
function hasClass( elem, name ) {
|
||||
return ( " " + elem.className + " " ).indexOf( " " + name + " " ) >= 0;
|
||||
}
|
||||
|
||||
function addClass( elem, name ) {
|
||||
if ( !hasClass( elem, name ) ) {
|
||||
elem.className += ( elem.className ? " " : "" ) + name;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleClass( elem, name ) {
|
||||
if ( hasClass( elem, name ) ) {
|
||||
removeClass( elem, name );
|
||||
} else {
|
||||
addClass( elem, name );
|
||||
}
|
||||
}
|
||||
|
||||
function removeClass( elem, name ) {
|
||||
var set = " " + elem.className + " ";
|
||||
|
||||
// Class name may appear multiple times
|
||||
while ( set.indexOf( " " + name + " " ) >= 0 ) {
|
||||
set = set.replace( " " + name + " ", " " );
|
||||
}
|
||||
|
||||
// trim for prettiness
|
||||
elem.className = typeof set.trim === "function" ? set.trim() : set.replace( /^\s+|\s+$/g, "" );
|
||||
}
|
||||
|
||||
function id( name ) {
|
||||
return defined.document && document.getElementById && document.getElementById( name );
|
||||
}
|
||||
|
||||
function getUrlConfigHtml() {
|
||||
var i, j, val,
|
||||
escaped, escapedTooltip,
|
||||
selection = false,
|
||||
len = config.urlConfig.length,
|
||||
urlConfigHtml = "";
|
||||
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
val = config.urlConfig[ i ];
|
||||
if ( typeof val === "string" ) {
|
||||
val = {
|
||||
id: val,
|
||||
label: val
|
||||
};
|
||||
}
|
||||
|
||||
escaped = escapeText( val.id );
|
||||
escapedTooltip = escapeText( val.tooltip );
|
||||
|
||||
config[ val.id ] = QUnit.urlParams[ val.id ];
|
||||
if ( !val.value || typeof val.value === "string" ) {
|
||||
urlConfigHtml += "<input id='qunit-urlconfig-" + escaped +
|
||||
"' name='" + escaped + "' type='checkbox'" +
|
||||
( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
|
||||
( config[ val.id ] ? " checked='checked'" : "" ) +
|
||||
" title='" + escapedTooltip + "'><label for='qunit-urlconfig-" + escaped +
|
||||
"' title='" + escapedTooltip + "'>" + val.label + "</label>";
|
||||
} else {
|
||||
urlConfigHtml += "<label for='qunit-urlconfig-" + escaped +
|
||||
"' title='" + escapedTooltip + "'>" + val.label +
|
||||
": </label><select id='qunit-urlconfig-" + escaped +
|
||||
"' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
|
||||
|
||||
if ( QUnit.is( "array", val.value ) ) {
|
||||
for ( j = 0; j < val.value.length; j++ ) {
|
||||
escaped = escapeText( val.value[ j ] );
|
||||
urlConfigHtml += "<option value='" + escaped + "'" +
|
||||
( config[ val.id ] === val.value[ j ] ?
|
||||
( selection = true ) && " selected='selected'" : "" ) +
|
||||
">" + escaped + "</option>";
|
||||
}
|
||||
} else {
|
||||
for ( j in val.value ) {
|
||||
if ( hasOwn.call( val.value, j ) ) {
|
||||
urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
|
||||
( config[ val.id ] === j ?
|
||||
( selection = true ) && " selected='selected'" : "" ) +
|
||||
">" + escapeText( val.value[ j ] ) + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( config[ val.id ] && !selection ) {
|
||||
escaped = escapeText( config[ val.id ] );
|
||||
urlConfigHtml += "<option value='" + escaped +
|
||||
"' selected='selected' disabled='disabled'>" + escaped + "</option>";
|
||||
}
|
||||
urlConfigHtml += "</select>";
|
||||
}
|
||||
}
|
||||
|
||||
return urlConfigHtml;
|
||||
}
|
||||
|
||||
function toolbarUrlConfigContainer() {
|
||||
var urlConfigContainer = document.createElement( "span" );
|
||||
|
||||
urlConfigContainer.innerHTML = getUrlConfigHtml();
|
||||
|
||||
// For oldIE support:
|
||||
// * Add handlers to the individual elements instead of the container
|
||||
// * Use "click" instead of "change" for checkboxes
|
||||
// * Fallback from event.target to event.srcElement
|
||||
addEvents( urlConfigContainer.getElementsByTagName( "input" ), "click", function( event ) {
|
||||
var params = {},
|
||||
target = event.target || event.srcElement;
|
||||
params[ target.name ] = target.checked ?
|
||||
target.defaultValue || true :
|
||||
undefined;
|
||||
window.location = QUnit.url( params );
|
||||
});
|
||||
addEvents( urlConfigContainer.getElementsByTagName( "select" ), "change", function( event ) {
|
||||
var params = {},
|
||||
target = event.target || event.srcElement;
|
||||
params[ target.name ] = target.options[ target.selectedIndex ].value || undefined;
|
||||
window.location = QUnit.url( params );
|
||||
});
|
||||
|
||||
return urlConfigContainer;
|
||||
}
|
||||
|
||||
function getModuleNames() {
|
||||
var i,
|
||||
moduleNames = [];
|
||||
|
||||
for ( i in config.modules ) {
|
||||
if ( config.modules.hasOwnProperty( i ) ) {
|
||||
moduleNames.push( i );
|
||||
}
|
||||
}
|
||||
|
||||
moduleNames.sort(function( a, b ) {
|
||||
return a.localeCompare( b );
|
||||
});
|
||||
|
||||
return moduleNames;
|
||||
}
|
||||
|
||||
function toolbarModuleFilterHtml() {
|
||||
var i,
|
||||
moduleFilterHtml = "",
|
||||
moduleNames = getModuleNames();
|
||||
|
||||
if ( moduleNames.length <= 1 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label>" +
|
||||
"<select id='qunit-modulefilter' name='modulefilter'><option value='' " +
|
||||
( config.module === undefined ? "selected='selected'" : "" ) +
|
||||
">< All Modules ></option>";
|
||||
|
||||
for ( i = 0; i < moduleNames.length; i++ ) {
|
||||
moduleFilterHtml += "<option value='" +
|
||||
escapeText( encodeURIComponent( moduleNames[ i ] ) ) + "' " +
|
||||
( config.module === moduleNames[ i ] ? "selected='selected'" : "" ) +
|
||||
">" + escapeText( moduleNames[ i ] ) + "</option>";
|
||||
}
|
||||
moduleFilterHtml += "</select>";
|
||||
|
||||
return moduleFilterHtml;
|
||||
}
|
||||
|
||||
function toolbarModuleFilter() {
|
||||
var moduleFilter = document.createElement( "span" ),
|
||||
moduleFilterHtml = toolbarModuleFilterHtml();
|
||||
|
||||
if ( !moduleFilterHtml ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
|
||||
moduleFilter.innerHTML = moduleFilterHtml;
|
||||
|
||||
addEvent( moduleFilter.lastChild, "change", function() {
|
||||
var selectBox = moduleFilter.getElementsByTagName( "select" )[ 0 ],
|
||||
selectedModule = decodeURIComponent( selectBox.options[ selectBox.selectedIndex ].value );
|
||||
|
||||
window.location = QUnit.url({
|
||||
module: ( selectedModule === "" ) ? undefined : selectedModule,
|
||||
|
||||
// Remove any existing filters
|
||||
filter: undefined,
|
||||
testNumber: undefined
|
||||
});
|
||||
});
|
||||
|
||||
return moduleFilter;
|
||||
}
|
||||
|
||||
function toolbarFilter() {
|
||||
var testList = id( "qunit-tests" ),
|
||||
filter = document.createElement( "input" );
|
||||
|
||||
filter.type = "checkbox";
|
||||
filter.id = "qunit-filter-pass";
|
||||
|
||||
addEvent( filter, "click", function() {
|
||||
if ( filter.checked ) {
|
||||
addClass( testList, "hidepass" );
|
||||
if ( defined.sessionStorage ) {
|
||||
sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
|
||||
}
|
||||
} else {
|
||||
removeClass( testList, "hidepass" );
|
||||
if ( defined.sessionStorage ) {
|
||||
sessionStorage.removeItem( "qunit-filter-passed-tests" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if ( config.hidepassed || defined.sessionStorage &&
|
||||
sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
|
||||
filter.checked = true;
|
||||
|
||||
addClass( testList, "hidepass" );
|
||||
}
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
function toolbarLabel() {
|
||||
var label = document.createElement( "label" );
|
||||
label.setAttribute( "for", "qunit-filter-pass" );
|
||||
label.setAttribute( "title", "Only show tests and assertions that fail. Stored in sessionStorage." );
|
||||
label.innerHTML = "Hide passed tests";
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
function appendToolbar() {
|
||||
var moduleFilter,
|
||||
toolbar = id( "qunit-testrunner-toolbar" );
|
||||
|
||||
if ( toolbar ) {
|
||||
toolbar.appendChild( toolbarFilter() );
|
||||
toolbar.appendChild( toolbarLabel() );
|
||||
toolbar.appendChild( toolbarUrlConfigContainer() );
|
||||
|
||||
moduleFilter = toolbarModuleFilter();
|
||||
if ( moduleFilter ) {
|
||||
toolbar.appendChild( moduleFilter );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function appendBanner() {
|
||||
var banner = id( "qunit-banner" );
|
||||
|
||||
if ( banner ) {
|
||||
banner.className = "";
|
||||
banner.innerHTML = "<a href='" +
|
||||
QUnit.url({ filter: undefined, module: undefined, testNumber: undefined }) +
|
||||
"'>" + banner.innerHTML + "</a> ";
|
||||
}
|
||||
}
|
||||
|
||||
function appendTestResults() {
|
||||
var tests = id( "qunit-tests" ),
|
||||
result = id( "qunit-testresult" );
|
||||
|
||||
if ( result ) {
|
||||
result.parentNode.removeChild( result );
|
||||
}
|
||||
|
||||
if ( tests ) {
|
||||
tests.innerHTML = "";
|
||||
result = document.createElement( "p" );
|
||||
result.id = "qunit-testresult";
|
||||
result.className = "result";
|
||||
tests.parentNode.insertBefore( result, tests );
|
||||
result.innerHTML = "Running...<br> ";
|
||||
}
|
||||
}
|
||||
|
||||
function storeFixture() {
|
||||
var fixture = id( "qunit-fixture" );
|
||||
if ( fixture ) {
|
||||
config.fixture = fixture.innerHTML;
|
||||
}
|
||||
}
|
||||
|
||||
function appendUserAgent() {
|
||||
var userAgent = id( "qunit-userAgent" );
|
||||
if ( userAgent ) {
|
||||
userAgent.innerHTML = navigator.userAgent;
|
||||
}
|
||||
}
|
||||
|
||||
// HTML Reporter initialization and load
|
||||
QUnit.begin(function() {
|
||||
var qunit = id( "qunit" );
|
||||
|
||||
if ( qunit ) {
|
||||
qunit.innerHTML =
|
||||
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
||||
"<h2 id='qunit-banner'></h2>" +
|
||||
"<div id='qunit-testrunner-toolbar'></div>" +
|
||||
"<h2 id='qunit-userAgent'></h2>" +
|
||||
"<ol id='qunit-tests'></ol>";
|
||||
}
|
||||
|
||||
appendBanner();
|
||||
appendTestResults();
|
||||
appendUserAgent();
|
||||
appendToolbar();
|
||||
storeFixture();
|
||||
});
|
||||
|
||||
QUnit.done(function( details ) {
|
||||
var i, key,
|
||||
banner = id( "qunit-banner" ),
|
||||
tests = id( "qunit-tests" ),
|
||||
html = [
|
||||
"Tests completed in ",
|
||||
details.runtime,
|
||||
" milliseconds.<br>",
|
||||
"<span class='passed'>",
|
||||
details.passed,
|
||||
"</span> assertions of <span class='total'>",
|
||||
details.total,
|
||||
"</span> passed, <span class='failed'>",
|
||||
details.failed,
|
||||
"</span> failed."
|
||||
].join( "" );
|
||||
|
||||
if ( banner ) {
|
||||
banner.className = details.failed ? "qunit-fail" : "qunit-pass";
|
||||
}
|
||||
|
||||
if ( tests ) {
|
||||
id( "qunit-testresult" ).innerHTML = html;
|
||||
}
|
||||
|
||||
if ( config.altertitle && defined.document && document.title ) {
|
||||
|
||||
// show ✖ for good, ✔ for bad suite result in title
|
||||
// use escape sequences in case file gets loaded with non-utf-8-charset
|
||||
document.title = [
|
||||
( details.failed ? "\u2716" : "\u2714" ),
|
||||
document.title.replace( /^[\u2714\u2716] /i, "" )
|
||||
].join( " " );
|
||||
}
|
||||
|
||||
// clear own sessionStorage items if all tests passed
|
||||
if ( config.reorder && defined.sessionStorage && details.failed === 0 ) {
|
||||
for ( i = 0; i < sessionStorage.length; i++ ) {
|
||||
key = sessionStorage.key( i++ );
|
||||
if ( key.indexOf( "qunit-test-" ) === 0 ) {
|
||||
sessionStorage.removeItem( key );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// scroll back to top to show results
|
||||
if ( config.scrolltop && window.scrollTo ) {
|
||||
window.scrollTo( 0, 0 );
|
||||
}
|
||||
});
|
||||
|
||||
function getNameHtml( name, module ) {
|
||||
var nameHtml = "";
|
||||
|
||||
if ( module ) {
|
||||
nameHtml = "<span class='module-name'>" + escapeText( module ) + "</span>: ";
|
||||
}
|
||||
|
||||
nameHtml += "<span class='test-name'>" + escapeText( name ) + "</span>";
|
||||
|
||||
return nameHtml;
|
||||
}
|
||||
|
||||
QUnit.testStart(function( details ) {
|
||||
var a, b, li, running, assertList,
|
||||
name = getNameHtml( details.name, details.module ),
|
||||
tests = id( "qunit-tests" );
|
||||
|
||||
if ( tests ) {
|
||||
b = document.createElement( "strong" );
|
||||
b.innerHTML = name;
|
||||
|
||||
a = document.createElement( "a" );
|
||||
a.innerHTML = "Rerun";
|
||||
a.href = QUnit.url({ testNumber: details.testNumber });
|
||||
|
||||
li = document.createElement( "li" );
|
||||
li.appendChild( b );
|
||||
li.appendChild( a );
|
||||
li.className = "running";
|
||||
li.id = "qunit-test-output" + details.testNumber;
|
||||
|
||||
assertList = document.createElement( "ol" );
|
||||
assertList.className = "qunit-assert-list";
|
||||
|
||||
li.appendChild( assertList );
|
||||
|
||||
tests.appendChild( li );
|
||||
}
|
||||
|
||||
running = id( "qunit-testresult" );
|
||||
if ( running ) {
|
||||
running.innerHTML = "Running: <br>" + name;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
QUnit.log(function( details ) {
|
||||
var assertList, assertLi,
|
||||
message, expected, actual,
|
||||
testItem = id( "qunit-test-output" + details.testNumber );
|
||||
|
||||
if ( !testItem ) {
|
||||
return;
|
||||
}
|
||||
|
||||
message = escapeText( details.message ) || ( details.result ? "okay" : "failed" );
|
||||
message = "<span class='test-message'>" + message + "</span>";
|
||||
|
||||
// pushFailure doesn't provide details.expected
|
||||
// when it calls, it's implicit to also not show expected and diff stuff
|
||||
// Also, we need to check details.expected existence, as it can exist and be undefined
|
||||
if ( !details.result && hasOwn.call( details, "expected" ) ) {
|
||||
expected = escapeText( QUnit.dump.parse( details.expected ) );
|
||||
actual = escapeText( QUnit.dump.parse( details.actual ) );
|
||||
message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" +
|
||||
expected +
|
||||
"</pre></td></tr>";
|
||||
|
||||
if ( actual !== expected ) {
|
||||
message += "<tr class='test-actual'><th>Result: </th><td><pre>" +
|
||||
actual + "</pre></td></tr>" +
|
||||
"<tr class='test-diff'><th>Diff: </th><td><pre>" +
|
||||
QUnit.diff( expected, actual ) + "</pre></td></tr>";
|
||||
}
|
||||
|
||||
if ( details.source ) {
|
||||
message += "<tr class='test-source'><th>Source: </th><td><pre>" +
|
||||
escapeText( details.source ) + "</pre></td></tr>";
|
||||
}
|
||||
|
||||
message += "</table>";
|
||||
|
||||
// this occours when pushFailure is set and we have an extracted stack trace
|
||||
} else if ( !details.result && details.source ) {
|
||||
message += "<table>" +
|
||||
"<tr class='test-source'><th>Source: </th><td><pre>" +
|
||||
escapeText( details.source ) + "</pre></td></tr>" +
|
||||
"</table>";
|
||||
}
|
||||
|
||||
assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
|
||||
|
||||
assertLi = document.createElement( "li" );
|
||||
assertLi.className = details.result ? "pass" : "fail";
|
||||
assertLi.innerHTML = message;
|
||||
assertList.appendChild( assertLi );
|
||||
});
|
||||
|
||||
QUnit.testDone(function( details ) {
|
||||
var testTitle, time, testItem, assertList,
|
||||
good, bad, testCounts,
|
||||
tests = id( "qunit-tests" );
|
||||
|
||||
// QUnit.reset() is deprecated and will be replaced for a new
|
||||
// fixture reset function on QUnit 2.0/2.1.
|
||||
// It's still called here for backwards compatibility handling
|
||||
QUnit.reset();
|
||||
|
||||
if ( !tests ) {
|
||||
return;
|
||||
}
|
||||
|
||||
testItem = id( "qunit-test-output" + details.testNumber );
|
||||
assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
|
||||
|
||||
good = details.passed;
|
||||
bad = details.failed;
|
||||
|
||||
// store result when possible
|
||||
if ( config.reorder && defined.sessionStorage ) {
|
||||
if ( bad ) {
|
||||
sessionStorage.setItem( "qunit-test-" + details.module + "-" + details.name, bad );
|
||||
} else {
|
||||
sessionStorage.removeItem( "qunit-test-" + details.module + "-" + details.name );
|
||||
}
|
||||
}
|
||||
|
||||
if ( bad === 0 ) {
|
||||
addClass( assertList, "qunit-collapsed" );
|
||||
}
|
||||
|
||||
// testItem.firstChild is the test name
|
||||
testTitle = testItem.firstChild;
|
||||
|
||||
testCounts = bad ?
|
||||
"<b class='failed'>" + bad + "</b>, " + "<b class='passed'>" + good + "</b>, " :
|
||||
"";
|
||||
|
||||
testTitle.innerHTML += " <b class='counts'>(" + testCounts +
|
||||
details.assertions.length + ")</b>";
|
||||
|
||||
addEvent( testTitle, "click", function() {
|
||||
toggleClass( assertList, "qunit-collapsed" );
|
||||
});
|
||||
|
||||
time = document.createElement( "span" );
|
||||
time.className = "runtime";
|
||||
time.innerHTML = details.runtime + " ms";
|
||||
|
||||
testItem.className = bad ? "fail" : "pass";
|
||||
|
||||
testItem.insertBefore( time, assertList );
|
||||
});
|
||||
|
||||
if ( !defined.document || document.readyState === "complete" ) {
|
||||
config.autorun = true;
|
||||
}
|
||||
|
||||
if ( defined.document ) {
|
||||
addEvent( window, "load", QUnit.load );
|
||||
}
|
||||
|
||||
})();
|
||||
|
@ -105,6 +105,11 @@
|
||||
var self = obj instanceof this.constructor ?
|
||||
obj : $(obj.currentTarget).data('bs.' + this.type)
|
||||
|
||||
if (self && self.$tip && self.$tip.is(':visible')) {
|
||||
self.hoverState = 'in'
|
||||
return
|
||||
}
|
||||
|
||||
if (!self) {
|
||||
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
||||
$(obj.currentTarget).data('bs.' + this.type, self)
|
||||
@ -147,7 +152,7 @@
|
||||
if (this.hasContent() && this.enabled) {
|
||||
this.$element.trigger(e)
|
||||
|
||||
var inDom = $.contains(document.documentElement, this.$element[0])
|
||||
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
|
||||
if (e.isDefaultPrevented() || !inDom) return
|
||||
var that = this
|
||||
|
||||
@ -256,16 +261,18 @@
|
||||
if (delta.left) offset.left += delta.left
|
||||
else offset.top += delta.top
|
||||
|
||||
var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
||||
var arrowPosition = delta.left ? 'left' : 'top'
|
||||
var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
|
||||
var isVertical = /top|bottom/.test(placement)
|
||||
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
||||
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
|
||||
|
||||
$tip.offset(offset)
|
||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
|
||||
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
||||
}
|
||||
|
||||
Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
|
||||
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
|
||||
Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
|
||||
this.arrow()
|
||||
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
||||
.css(isHorizontal ? 'top' : 'left', '')
|
||||
}
|
||||
|
||||
Tooltip.prototype.setContent = function () {
|
||||
@ -276,16 +283,17 @@
|
||||
$tip.removeClass('fade in top bottom left right')
|
||||
}
|
||||
|
||||
Tooltip.prototype.hide = function () {
|
||||
Tooltip.prototype.hide = function (callback) {
|
||||
var that = this
|
||||
var $tip = this.tip()
|
||||
var e = $.Event('hide.bs.' + this.type)
|
||||
|
||||
this.$element.removeAttr('aria-describedby')
|
||||
|
||||
function complete() {
|
||||
if (that.hoverState != 'in') $tip.detach()
|
||||
that.$element.trigger('hidden.bs.' + that.type)
|
||||
that.$element
|
||||
.removeAttr('aria-describedby')
|
||||
.trigger('hidden.bs.' + that.type)
|
||||
callback && callback()
|
||||
}
|
||||
|
||||
this.$element.trigger(e)
|
||||
@ -323,7 +331,11 @@
|
||||
var isBody = el.tagName == 'BODY'
|
||||
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||
|
||||
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
|
||||
var elRect = el.getBoundingClientRect()
|
||||
if (elRect.width == null) {
|
||||
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
||||
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
||||
}
|
||||
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||
var outerDims = isSvg ? {} : {
|
||||
@ -395,14 +407,6 @@
|
||||
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
|
||||
}
|
||||
|
||||
Tooltip.prototype.validate = function () {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide()
|
||||
this.$element = null
|
||||
this.options = null
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.enable = function () {
|
||||
this.enabled = true
|
||||
}
|
||||
@ -429,8 +433,11 @@
|
||||
}
|
||||
|
||||
Tooltip.prototype.destroy = function () {
|
||||
var that = this
|
||||
clearTimeout(this.timeout)
|
||||
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
|
||||
this.hide(function () {
|
||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
@ -226,11 +226,14 @@
|
||||
// Checkbox and radio options
|
||||
//
|
||||
// In order to support the browser's form validation feedback, powered by the
|
||||
// `required` attribute, we have to "hide" the inputs via `opacity`. We cannot
|
||||
// use `display: none;` or `visibility: hidden;` as that also hides the popover.
|
||||
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
|
||||
// `display: none;` or `visibility: hidden;` as that also hides the popover.
|
||||
// Simply visually hiding the inputs via `opacity` would leave them clickable in
|
||||
// certain cases which is prevented by using `clip` and `pointer-events`.
|
||||
// This way, we ensure a DOM element is visible to position the popover from.
|
||||
//
|
||||
// See https://github.com/twbs/bootstrap/pull/12794 for more.
|
||||
// See https://github.com/twbs/bootstrap/pull/12794 and
|
||||
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
||||
|
||||
[data-toggle="buttons"] {
|
||||
> .btn,
|
||||
@ -238,8 +241,8 @@
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
clip: rect(0,0,0,0);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,9 +96,8 @@
|
||||
&:focus {
|
||||
color: @dropdown-link-disabled-color;
|
||||
}
|
||||
}
|
||||
// Nuke hover/focus effects
|
||||
.dropdown-menu > .disabled > a {
|
||||
|
||||
// Nuke hover/focus effects
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
@ -205,4 +204,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -328,12 +328,12 @@ input[type="checkbox"] {
|
||||
|
||||
.input-sm,
|
||||
.form-group-sm .form-control {
|
||||
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
|
||||
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
|
||||
}
|
||||
|
||||
.input-lg,
|
||||
.form-group-lg .form-control {
|
||||
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
|
||||
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
.jumbotron {
|
||||
padding: @jumbotron-padding;
|
||||
padding: @jumbotron-padding (@jumbotron-padding / 2);
|
||||
margin-bottom: @jumbotron-padding;
|
||||
color: @jumbotron-color;
|
||||
background-color: @jumbotron-bg;
|
||||
@ -18,7 +18,8 @@
|
||||
border-top-color: darken(@jumbotron-bg, 10%);
|
||||
}
|
||||
|
||||
.container & {
|
||||
.container &,
|
||||
.container-fluid & {
|
||||
.border-radius(@border-radius-large); // Only round corners at higher resolutions if contained in a container
|
||||
}
|
||||
|
||||
@ -27,8 +28,7 @@
|
||||
}
|
||||
|
||||
@media screen and (min-width: @screen-sm-min) {
|
||||
padding-top: (@jumbotron-padding * 1.6);
|
||||
padding-bottom: (@jumbotron-padding * 1.6);
|
||||
padding: (@jumbotron-padding * 1.6) 0;
|
||||
|
||||
.container & {
|
||||
padding-left: (@jumbotron-padding * 2);
|
||||
|
@ -75,7 +75,7 @@ a.list-group-item {
|
||||
background-color: @list-group-disabled-bg;
|
||||
color: @list-group-disabled-color;
|
||||
cursor: not-allowed;
|
||||
|
||||
|
||||
// Force color to inherit for custom content
|
||||
.list-group-item-heading {
|
||||
color: inherit;
|
||||
|
@ -322,6 +322,10 @@
|
||||
.form-group {
|
||||
@media (max-width: @grid-float-breakpoint-max) {
|
||||
margin-bottom: 5px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,5 +51,4 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,7 +11,11 @@
|
||||
display: none;
|
||||
max-width: @popover-max-width;
|
||||
padding: 1px;
|
||||
text-align: left; // Reset given new insertion method
|
||||
// Reset font and text propertes given new insertion method
|
||||
font-size: @font-size-base;
|
||||
font-weight: normal;
|
||||
line-height: @line-height-base;
|
||||
text-align: left;
|
||||
background-color: @popover-bg;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid @popover-border-color;
|
||||
@ -32,8 +36,6 @@
|
||||
margin: 0; // reset heading margin
|
||||
padding: 8px 14px;
|
||||
font-size: @font-size-base;
|
||||
font-weight: normal;
|
||||
line-height: 18px;
|
||||
background-color: @popover-title-bg;
|
||||
border-bottom: 1px solid darken(@popover-title-bg, 5%);
|
||||
border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
|
||||
@ -124,5 +126,4 @@
|
||||
bottom: -@popover-arrow-width;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,15 +1,14 @@
|
||||
//
|
||||
// Basic print styles
|
||||
// --------------------------------------------------
|
||||
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
|
||||
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
|
||||
|
||||
@media print {
|
||||
|
||||
* {
|
||||
text-shadow: none !important;
|
||||
color: #000 !important; // Black prints faster: h5bp.com/s
|
||||
background: transparent !important;
|
||||
color: #000 !important; // Black prints faster: h5bp.com/s
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a,
|
||||
@ -25,9 +24,10 @@
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
// Don't show links for images, or javascript/internal links
|
||||
a[href^="javascript:"]:after,
|
||||
a[href^="#"]:after {
|
||||
// Don't show links that are fragment identifiers,
|
||||
// or use the `javascript:` pseudo protocol
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
@ -72,12 +72,6 @@
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
.table {
|
||||
td,
|
||||
th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
}
|
||||
.btn,
|
||||
.dropup > .btn {
|
||||
> .caret {
|
||||
@ -90,6 +84,11 @@
|
||||
|
||||
.table {
|
||||
border-collapse: collapse !important;
|
||||
|
||||
td,
|
||||
th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
}
|
||||
.table-bordered {
|
||||
th,
|
||||
@ -97,5 +96,4 @@
|
||||
border: 1px solid #ddd !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -186,8 +186,15 @@
|
||||
@input-color: @gray;
|
||||
//** `<input>` border color
|
||||
@input-border: #ccc;
|
||||
//** `<input>` border radius
|
||||
|
||||
// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
|
||||
//** Default `.form-control` border radius
|
||||
@input-border-radius: @border-radius-base;
|
||||
//** Large `.form-control` border radius
|
||||
@input-border-radius-large: @border-radius-large;
|
||||
//** Small `.form-control` border radius
|
||||
@input-border-radius-small: @border-radius-small;
|
||||
|
||||
//** Border color for inputs on focus
|
||||
@input-border-focus: #66afe9;
|
||||
@input-box-shadow-focus: rgba(102,175,233,.6);
|
||||
@ -348,7 +355,7 @@
|
||||
@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);
|
||||
|
||||
// Inverted navbar links
|
||||
@navbar-inverse-link-color: @gray-light;
|
||||
@navbar-inverse-link-color: lighten(@gray-light, 15%);
|
||||
@navbar-inverse-link-hover-color: #fff;
|
||||
@navbar-inverse-link-hover-bg: transparent;
|
||||
@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color;
|
||||
@ -378,8 +385,6 @@
|
||||
@nav-disabled-link-color: @gray-light;
|
||||
@nav-disabled-link-hover-color: @gray-light;
|
||||
|
||||
@nav-open-link-hover-color: #fff;
|
||||
|
||||
//== Tabs
|
||||
@nav-tabs-border-color: #ddd;
|
||||
|
||||
@ -504,7 +509,7 @@
|
||||
//** Popover arrow width
|
||||
@popover-arrow-width: 10px;
|
||||
//** Popover arrow color
|
||||
@popover-arrow-color: #fff;
|
||||
@popover-arrow-color: @popover-bg;
|
||||
|
||||
//** Popover outer arrow width
|
||||
@popover-arrow-outer-width: (@popover-arrow-width + 1);
|
||||
@ -764,5 +769,3 @@
|
||||
@dl-horizontal-offset: @component-offset-horizontal;
|
||||
//** Horizontal line color.
|
||||
@hr-border: @gray-lighter;
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
.label-variant(@color) {
|
||||
background-color: @color;
|
||||
|
||||
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
|
19
package.json
19
package.json
@ -31,34 +31,33 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"btoa": "~1.1.2",
|
||||
"glob": "~4.0.4",
|
||||
"glob": "~4.0.5",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-autoprefixer": "~0.8.2",
|
||||
"grunt-autoprefixer": "~1.0.1",
|
||||
"grunt-banner": "~0.2.3",
|
||||
"grunt-contrib-clean": "~0.6.0",
|
||||
"grunt-contrib-concat": "~0.5.0",
|
||||
"grunt-contrib-connect": "~0.8.0",
|
||||
"grunt-contrib-copy": "~0.5.0",
|
||||
"grunt-contrib-csslint": "~0.2.0",
|
||||
"grunt-contrib-csslint": "~0.3.1",
|
||||
"grunt-contrib-cssmin": "~0.10.0",
|
||||
"grunt-contrib-jade": "~0.12.0",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-less": "~0.11.3",
|
||||
"grunt-contrib-less": "~0.11.4",
|
||||
"grunt-contrib-qunit": "~0.5.2",
|
||||
"grunt-contrib-uglify": "~0.5.0",
|
||||
"grunt-contrib-uglify": "~0.5.1",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-csscomb": "~3.0.0",
|
||||
"grunt-exec": "~0.4.6",
|
||||
"grunt-html-validation": "~0.1.18",
|
||||
"grunt-jekyll": "~0.4.2",
|
||||
"grunt-jscs": "~0.6.1",
|
||||
"grunt-lesslint": "~0.17.0",
|
||||
"grunt-saucelabs": "~8.2.0",
|
||||
"grunt-jscs": "~0.7.1",
|
||||
"grunt-saucelabs": "~8.3.2",
|
||||
"grunt-sed": "~0.1.1",
|
||||
"load-grunt-tasks": "~0.6.0",
|
||||
"markdown": "~0.5.0",
|
||||
"npm-shrinkwrap": "~3.1.6",
|
||||
"time-grunt": "~0.4.0"
|
||||
"npm-shrinkwrap": "~3.1.8",
|
||||
"time-grunt": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "~0.10.1"
|
||||
|
1168
test-infra/npm-shrinkwrap.json
generated
1168
test-infra/npm-shrinkwrap.json
generated
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "bootstrap",
|
||||
"version": "3.2.0",
|
||||
"npm-shrinkwrap-version": "3.1.7",
|
||||
"npm-shrinkwrap-version": "3.1.8",
|
||||
"dependencies": {
|
||||
"btoa": {
|
||||
"version": "1.1.2",
|
||||
@ -226,56 +226,28 @@
|
||||
}
|
||||
},
|
||||
"grunt-autoprefixer": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/grunt-autoprefixer/-/grunt-autoprefixer-0.8.2.tgz",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/grunt-autoprefixer/-/grunt-autoprefixer-1.0.1.tgz",
|
||||
"dependencies": {
|
||||
"autoprefixer": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-2.2.0.tgz",
|
||||
"autoprefixer-core": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer-core/-/autoprefixer-core-3.0.1.tgz",
|
||||
"dependencies": {
|
||||
"caniuse-db": {
|
||||
"version": "1.0.20140730",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.20140730.tgz"
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.10.0.tgz",
|
||||
"dependencies": {
|
||||
"jsonfile": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-1.2.0.tgz"
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ncp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/ncp/-/ncp-0.5.1.tgz"
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz"
|
||||
}
|
||||
}
|
||||
"version": "1.0.20140906",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.20140906.tgz"
|
||||
},
|
||||
"postcss": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-2.1.0.tgz",
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-2.2.4.tgz",
|
||||
"dependencies": {
|
||||
"base64-js": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.7.tgz"
|
||||
"js-base64": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.5.tgz"
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.1.37",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.37.tgz",
|
||||
"version": "0.1.38",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.38.tgz",
|
||||
"dependencies": {
|
||||
"amdefine": {
|
||||
"version": "0.1.0",
|
||||
@ -388,8 +360,8 @@
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.1.37",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.37.tgz",
|
||||
"version": "0.1.38",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.38.tgz",
|
||||
"dependencies": {
|
||||
"amdefine": {
|
||||
"version": "0.1.0",
|
||||
@ -570,8 +542,8 @@
|
||||
"resolved": "https://registry.npmjs.org/multiparty/-/multiparty-3.2.8.tgz",
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "1.1.13-1",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13-1.tgz",
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
|
||||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.1",
|
||||
@ -586,8 +558,8 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.25-1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz"
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -668,8 +640,8 @@
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
|
||||
},
|
||||
"range-parser": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz"
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -716,9 +688,47 @@
|
||||
"resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz"
|
||||
},
|
||||
"grunt-contrib-csslint": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/grunt-contrib-csslint/-/grunt-contrib-csslint-0.2.0.tgz",
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/grunt-contrib-csslint/-/grunt-contrib-csslint-0.3.1.tgz",
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz"
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.1.tgz"
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"csslint": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/csslint/-/csslint-0.10.0.tgz",
|
||||
@ -728,6 +738,10 @@
|
||||
"resolved": "https://registry.npmjs.org/parserlib/-/parserlib-0.2.5.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -754,8 +768,8 @@
|
||||
}
|
||||
},
|
||||
"clean-css": {
|
||||
"version": "2.2.11",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-2.2.11.tgz",
|
||||
"version": "2.2.15",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-2.2.15.tgz",
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.2.0",
|
||||
@ -806,8 +820,8 @@
|
||||
}
|
||||
},
|
||||
"figures": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.0.2.tgz"
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.3.2.tgz"
|
||||
},
|
||||
"gzip-size": {
|
||||
"version": "0.2.0",
|
||||
@ -832,8 +846,8 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.13-1",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13-1.tgz",
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
|
||||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.1",
|
||||
@ -844,8 +858,8 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.25-1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz"
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1022,8 +1036,8 @@
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.1.37",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.37.tgz",
|
||||
"version": "0.1.38",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.38.tgz",
|
||||
"dependencies": {
|
||||
"amdefine": {
|
||||
"version": "0.1.0",
|
||||
@ -1036,8 +1050,8 @@
|
||||
}
|
||||
},
|
||||
"with": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/with/-/with-3.0.0.tgz",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/with/-/with-3.0.1.tgz",
|
||||
"dependencies": {
|
||||
"uglify-js": {
|
||||
"version": "2.4.15",
|
||||
@ -1088,12 +1102,12 @@
|
||||
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz"
|
||||
},
|
||||
"jshint": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.2.tgz",
|
||||
"version": "2.5.5",
|
||||
"resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.5.tgz",
|
||||
"dependencies": {
|
||||
"cli": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/cli/-/cli-0.6.3.tgz",
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/cli/-/cli-0.6.4.tgz",
|
||||
"dependencies": {
|
||||
"glob": {
|
||||
"version": "3.2.11",
|
||||
@ -1156,8 +1170,8 @@
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz"
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.13-1",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13-1.tgz",
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
|
||||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.1",
|
||||
@ -1172,8 +1186,8 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.25-1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz"
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1256,34 +1270,40 @@
|
||||
}
|
||||
},
|
||||
"less": {
|
||||
"version": "1.7.4",
|
||||
"resolved": "https://registry.npmjs.org/less/-/less-1.7.4.tgz",
|
||||
"version": "1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/less/-/less-1.7.5.tgz",
|
||||
"dependencies": {
|
||||
"clean-css": {
|
||||
"version": "2.1.8",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-2.1.8.tgz",
|
||||
"version": "2.2.15",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-2.2.15.tgz",
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz"
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.2.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz"
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
|
||||
},
|
||||
"mime": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"version": "2.34.0",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.34.0.tgz",
|
||||
"version": "2.40.0",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.40.0.tgz",
|
||||
"dependencies": {
|
||||
"aws-sign2": {
|
||||
"version": "0.5.0",
|
||||
@ -1314,8 +1334,8 @@
|
||||
}
|
||||
},
|
||||
"hawk": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
|
||||
"dependencies": {
|
||||
"boom": {
|
||||
"version": "0.4.2",
|
||||
@ -1357,6 +1377,10 @@
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz"
|
||||
},
|
||||
"node-uuid": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
|
||||
@ -1366,28 +1390,32 @@
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
|
||||
},
|
||||
"qs": {
|
||||
"version": "0.6.6",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz"
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-1.0.2.tgz"
|
||||
},
|
||||
"stringstream": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz"
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tunnel-agent": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz"
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.1.37",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.37.tgz",
|
||||
"version": "0.1.38",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.38.tgz",
|
||||
"dependencies": {
|
||||
"amdefine": {
|
||||
"version": "0.1.0",
|
||||
@ -1436,8 +1464,8 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.13-1",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13-1.tgz",
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
|
||||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.1",
|
||||
@ -1448,8 +1476,8 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.25-1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz"
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1572,8 +1600,8 @@
|
||||
}
|
||||
},
|
||||
"progress": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.7.tgz"
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz"
|
||||
},
|
||||
"request": {
|
||||
"version": "2.36.0",
|
||||
@ -1672,8 +1700,8 @@
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1772,8 +1800,8 @@
|
||||
"resolved": "https://registry.npmjs.org/maxmin/-/maxmin-0.2.2.tgz",
|
||||
"dependencies": {
|
||||
"figures": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.0.2.tgz"
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.3.2.tgz"
|
||||
},
|
||||
"gzip-size": {
|
||||
"version": "0.2.0",
|
||||
@ -1798,8 +1826,8 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.13-1",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13-1.tgz",
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
|
||||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.1",
|
||||
@ -1810,8 +1838,8 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.25-1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz"
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1962,8 +1990,8 @@
|
||||
"resolved": "https://registry.npmjs.org/grunt-csscomb/-/grunt-csscomb-3.0.0.tgz",
|
||||
"dependencies": {
|
||||
"csscomb": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/csscomb/-/csscomb-3.0.0.tgz",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/csscomb/-/csscomb-3.0.1.tgz",
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.0.0",
|
||||
@ -2162,8 +2190,8 @@
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2328,16 +2356,16 @@
|
||||
}
|
||||
},
|
||||
"grunt-jscs": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/grunt-jscs/-/grunt-jscs-0.6.2.tgz",
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/grunt-jscs/-/grunt-jscs-0.7.1.tgz",
|
||||
"dependencies": {
|
||||
"hooker": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz"
|
||||
},
|
||||
"jscs": {
|
||||
"version": "1.5.9",
|
||||
"resolved": "https://registry.npmjs.org/jscs/-/jscs-1.5.9.tgz",
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/jscs/-/jscs-1.6.1.tgz",
|
||||
"dependencies": {
|
||||
"colors": {
|
||||
"version": "0.6.2",
|
||||
@ -2351,9 +2379,13 @@
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz"
|
||||
},
|
||||
"exit": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "2.5.0",
|
||||
@ -2366,12 +2398,12 @@
|
||||
}
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz"
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.1.tgz"
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz"
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.1.0.tgz"
|
||||
},
|
||||
"vow-fs": {
|
||||
"version": "0.3.2",
|
||||
@ -2422,286 +2454,12 @@
|
||||
}
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.3.0.tgz",
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.4.3.tgz",
|
||||
"dependencies": {
|
||||
"lodash.assign": {
|
||||
"lodash-node": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreatecallback": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._setbinddata": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.bind": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._createwrapper": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basebind": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreate": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash._basecreatewrapper": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreate": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash._slice": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.identity": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz"
|
||||
},
|
||||
"lodash.support": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash._objecttypes": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz"
|
||||
},
|
||||
"lodash.keys": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash._shimkeys": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.create": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreate": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.isarray": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.isempty": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash.forown": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.forown/-/lodash.forown-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreatecallback": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._setbinddata": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.bind": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._createwrapper": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basebind": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreate": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash._basecreatewrapper": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._basecreate": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash.noop": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash._slice": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.identity": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz"
|
||||
},
|
||||
"lodash.support": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash._objecttypes": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz"
|
||||
},
|
||||
"lodash.keys": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._isnative": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"
|
||||
},
|
||||
"lodash._shimkeys": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash.isfunction": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-2.4.1.tgz"
|
||||
},
|
||||
"lodash.isobject": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz",
|
||||
"dependencies": {
|
||||
"lodash._objecttypes": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
"resolved": "https://registry.npmjs.org/lodash-node/-/lodash-node-2.4.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2718,8 +2476,8 @@
|
||||
}
|
||||
},
|
||||
"grunt-saucelabs": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/grunt-saucelabs/-/grunt-saucelabs-8.2.0.tgz",
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/grunt-saucelabs/-/grunt-saucelabs-8.3.2.tgz",
|
||||
"dependencies": {
|
||||
"colors": {
|
||||
"version": "0.6.2",
|
||||
@ -3038,8 +2796,8 @@
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -3324,8 +3082,8 @@
|
||||
}
|
||||
},
|
||||
"npm-shrinkwrap": {
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/npm-shrinkwrap/-/npm-shrinkwrap-3.1.7.tgz",
|
||||
"version": "3.1.8",
|
||||
"resolved": "https://registry.npmjs.org/npm-shrinkwrap/-/npm-shrinkwrap-3.1.8.tgz",
|
||||
"dependencies": {
|
||||
"array-find": {
|
||||
"version": "0.1.1",
|
||||
@ -3366,8 +3124,8 @@
|
||||
"resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz",
|
||||
"dependencies": {
|
||||
"heap": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/heap/-/heap-0.2.3.tgz"
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/heap/-/heap-0.2.4.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -3456,8 +3214,8 @@
|
||||
}
|
||||
},
|
||||
"npm": {
|
||||
"version": "1.4.22",
|
||||
"resolved": "https://registry.npmjs.org/npm/-/npm-1.4.22.tgz",
|
||||
"version": "1.4.21",
|
||||
"resolved": "https://registry.npmjs.org/npm/-/npm-1.4.21.tgz",
|
||||
"dependencies": {
|
||||
"abbrev": {
|
||||
"version": "1.0.5",
|
||||
@ -3500,24 +3258,8 @@
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-0.0.1.tgz"
|
||||
},
|
||||
"cmd-shim": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-1.1.2.tgz",
|
||||
"dependencies": {
|
||||
"graceful-fs": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz"
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-1.1.1.tgz"
|
||||
},
|
||||
"columnify": {
|
||||
"version": "1.1.0",
|
||||
@ -3550,102 +3292,30 @@
|
||||
"resolved": "https://registry.npmjs.org/editor/-/editor-0.1.0.tgz"
|
||||
},
|
||||
"fstream": {
|
||||
"version": "0.1.29",
|
||||
"resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.29.tgz",
|
||||
"dependencies": {
|
||||
"mkdirp": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
|
||||
}
|
||||
}
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.28.tgz"
|
||||
},
|
||||
"fstream-npm": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-0.1.7.tgz",
|
||||
"dependencies": {
|
||||
"fstream-ignore": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-0.0.10.tgz",
|
||||
"dependencies": {
|
||||
"fstream": {
|
||||
"version": "0.1.29",
|
||||
"resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.29.tgz",
|
||||
"dependencies": {
|
||||
"graceful-fs": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
|
||||
},
|
||||
"sigmund": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-0.0.8.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"github-url-from-git": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.2.0.tgz"
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.1.1.tgz"
|
||||
},
|
||||
"github-url-from-username-repo": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-0.2.0.tgz"
|
||||
},
|
||||
"glob": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-4.0.5.tgz",
|
||||
"dependencies": {
|
||||
"graceful-fs": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
|
||||
},
|
||||
"sigmund": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.3.0.tgz"
|
||||
}
|
||||
}
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-4.0.3.tgz"
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "3.0.2",
|
||||
@ -3664,76 +3334,12 @@
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.2.1.tgz"
|
||||
},
|
||||
"init-package-json": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.0.0.tgz",
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-0.1.0.tgz",
|
||||
"dependencies": {
|
||||
"promzard": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
|
||||
},
|
||||
"read-package-json": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.2.5.tgz",
|
||||
"dependencies": {
|
||||
"github-url-from-git": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.3.0.tgz"
|
||||
},
|
||||
"glob": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-4.0.5.tgz",
|
||||
"dependencies": {
|
||||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
|
||||
"dependencies": {
|
||||
"sigmund": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.3.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
|
||||
},
|
||||
"normalize-package-data": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.4.2.tgz",
|
||||
"dependencies": {
|
||||
"github-url-from-git": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.1.1.tgz"
|
||||
},
|
||||
"github-url-from-username-repo": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-0.2.0.tgz"
|
||||
},
|
||||
"semver": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-3.0.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-3.0.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -3745,10 +3351,6 @@
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
|
||||
},
|
||||
"marked": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.2.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
|
||||
@ -3765,153 +3367,7 @@
|
||||
},
|
||||
"node-gyp": {
|
||||
"version": "0.13.1",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-0.13.1.tgz",
|
||||
"dependencies": {
|
||||
"minimatch": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz",
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
|
||||
},
|
||||
"sigmund": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"version": "2.39.0",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.39.0.tgz",
|
||||
"dependencies": {
|
||||
"aws-sign2": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
|
||||
},
|
||||
"forever-agent": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
|
||||
},
|
||||
"form-data": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.5.tgz",
|
||||
"dependencies": {
|
||||
"delayed-stream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mime": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hawk": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
|
||||
"dependencies": {
|
||||
"boom": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
|
||||
},
|
||||
"cryptiles": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
|
||||
},
|
||||
"hoek": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
|
||||
},
|
||||
"sntp": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"http-signature": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz",
|
||||
"dependencies": {
|
||||
"asn1": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
|
||||
},
|
||||
"assert-plus": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"
|
||||
},
|
||||
"ctype": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"json-stringify-safe": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.1.tgz"
|
||||
},
|
||||
"node-uuid": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
|
||||
},
|
||||
"qs": {
|
||||
"version": "0.6.6",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz"
|
||||
},
|
||||
"stringstream": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz"
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tunnel-agent": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz"
|
||||
}
|
||||
}
|
||||
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-0.13.1.tgz"
|
||||
},
|
||||
"nopt": {
|
||||
"version": "3.0.1",
|
||||
@ -3922,172 +3378,12 @@
|
||||
"resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.1.tgz"
|
||||
},
|
||||
"npm-install-checks": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.3.tgz"
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.2.tgz"
|
||||
},
|
||||
"npm-registry-client": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-2.0.3.tgz",
|
||||
"dependencies": {
|
||||
"chownr": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-0.0.1.tgz"
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.2.tgz"
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
|
||||
},
|
||||
"npm-cache-filename": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.1.tgz"
|
||||
},
|
||||
"npmlog": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-0.1.1.tgz",
|
||||
"dependencies": {
|
||||
"ansi": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"version": "2.39.0",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.39.0.tgz",
|
||||
"dependencies": {
|
||||
"aws-sign2": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
|
||||
},
|
||||
"forever-agent": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
|
||||
},
|
||||
"form-data": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.5.tgz",
|
||||
"dependencies": {
|
||||
"delayed-stream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mime": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hawk": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
|
||||
"dependencies": {
|
||||
"boom": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
|
||||
},
|
||||
"cryptiles": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
|
||||
},
|
||||
"hoek": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
|
||||
},
|
||||
"sntp": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"http-signature": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz",
|
||||
"dependencies": {
|
||||
"asn1": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
|
||||
},
|
||||
"assert-plus": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"
|
||||
},
|
||||
"ctype": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"json-stringify-safe": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.1.tgz"
|
||||
},
|
||||
"node-uuid": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
|
||||
},
|
||||
"qs": {
|
||||
"version": "0.6.6",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz"
|
||||
},
|
||||
"stringstream": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz"
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tunnel-agent": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"retry": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/retry/-/retry-0.6.0.tgz"
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz"
|
||||
},
|
||||
"semver": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz"
|
||||
},
|
||||
"slide": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/slide/-/slide-1.1.5.tgz"
|
||||
}
|
||||
}
|
||||
"resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-2.0.3.tgz"
|
||||
},
|
||||
"npm-user-validate": {
|
||||
"version": "0.1.0",
|
||||
@ -4140,8 +3436,8 @@
|
||||
}
|
||||
},
|
||||
"read-installed": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/read-installed/-/read-installed-2.0.7.tgz",
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/read-installed/-/read-installed-2.0.5.tgz",
|
||||
"dependencies": {
|
||||
"util-extend": {
|
||||
"version": "1.0.1",
|
||||
@ -4150,18 +3446,12 @@
|
||||
}
|
||||
},
|
||||
"read-package-json": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.2.5.tgz",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.2.2.tgz",
|
||||
"dependencies": {
|
||||
"normalize-package-data": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.4.2.tgz",
|
||||
"dependencies": {
|
||||
"github-url-from-git": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.1.1.tgz"
|
||||
}
|
||||
}
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.3.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4174,20 +3464,20 @@
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
|
||||
},
|
||||
"forever-agent": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.0.tgz"
|
||||
},
|
||||
"form-data": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz",
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-0.2.9.tgz"
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.5.tgz",
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.4.tgz",
|
||||
"dependencies": {
|
||||
"delayed-stream": {
|
||||
"version": "0.0.5",
|
||||
@ -4262,8 +3552,8 @@
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz",
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.0.tgz"
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4274,36 +3564,16 @@
|
||||
}
|
||||
},
|
||||
"retry": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/retry/-/retry-0.6.1.tgz"
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/retry/-/retry-0.6.0.tgz"
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz"
|
||||
},
|
||||
"ronn": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/ronn/-/ronn-0.4.0.tgz",
|
||||
"dependencies": {
|
||||
"markdown": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown/-/markdown-0.5.0.tgz",
|
||||
"dependencies": {
|
||||
"nopt": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-2.1.2.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"opts": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/opts/-/opts-1.2.2.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz"
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-2.3.0.tgz"
|
||||
},
|
||||
"sha": {
|
||||
"version": "1.2.4",
|
||||
@ -4322,8 +3592,8 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.25",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz"
|
||||
"version": "0.10.25-1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4390,8 +3660,8 @@
|
||||
}
|
||||
},
|
||||
"time-grunt": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/time-grunt/-/time-grunt-0.4.0.tgz",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/time-grunt/-/time-grunt-1.0.0.tgz",
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "0.5.1",
|
||||
@ -4432,24 +3702,28 @@
|
||||
}
|
||||
},
|
||||
"date-time": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz"
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/date-time/-/date-time-1.0.0.tgz"
|
||||
},
|
||||
"figures": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.0.2.tgz"
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.3.2.tgz"
|
||||
},
|
||||
"hooker": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz"
|
||||
},
|
||||
"pretty-ms": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-1.0.0.tgz",
|
||||
"dependencies": {
|
||||
"get-stdin": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-3.0.0.tgz"
|
||||
},
|
||||
"parse-ms": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz"
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2,5 +2,14 @@
|
||||
set -e
|
||||
cd .. # /bootstrap/
|
||||
cp test-infra/npm-shrinkwrap.json npm-shrinkwrap.json
|
||||
npm install
|
||||
# npm is flaky, so try multiple times
|
||||
MAXTRIES=3
|
||||
TRIES=1
|
||||
while ! npm install; do
|
||||
if [ $TRIES -ge $MAXTRIES ]; then
|
||||
exit 1
|
||||
fi
|
||||
TRIES=$(($TRIES + 1))
|
||||
echo "Retrying npm install (Try $TRIES of $MAXTRIES)..."
|
||||
done
|
||||
rm npm-shrinkwrap.json
|
||||
|
Loading…
x
Reference in New Issue
Block a user