Commit 91d51d3f authored by Mark Otto's avatar Mark Otto

Merge branch 'master' into icon_paths

parents c42cd816 3dd1531d
...@@ -6,13 +6,16 @@ before_install: ...@@ -6,13 +6,16 @@ before_install:
- rvm use 1.9.3 --fuzzy - rvm use 1.9.3 --fuzzy
- export GEMDIR=$(rvm gemdir) - export GEMDIR=$(rvm gemdir)
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi - if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- 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: install:
- time npm install -g grunt-cli - time npm install -g grunt-cli
- ./test-infra/s3_cache.py download npm-modules - ./test-infra/s3_cache.py download npm-modules
- if [ "$TWBS_TEST" = validate-html ]; then ./test-infra/s3_cache.py download rubygems; fi - if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py download rubygems; fi
after_script: after_script:
- if [ "$TWBS_TEST" = core ]; then ./test-infra/s3_cache.py upload npm-modules; fi - if [ "$TWBS_TEST" = core ]; then ./test-infra/s3_cache.py upload npm-modules; fi
- if [ "$TWBS_TEST" = validate-html ]; then ./test-infra/s3_cache.py upload rubygems; fi - if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py upload rubygems; fi
env: env:
global: global:
- JEKYLL_VERSION: 1.5.0 - JEKYLL_VERSION: 1.5.0
......
...@@ -175,15 +175,6 @@ module.exports = function (grunt) { ...@@ -175,15 +175,6 @@ module.exports = function (grunt) {
files: { files: {
'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less' 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less'
} }
},
minify: {
options: {
cleancss: true
},
files: {
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css'
}
} }
}, },
...@@ -237,8 +228,13 @@ module.exports = function (grunt) { ...@@ -237,8 +228,13 @@ module.exports = function (grunt) {
cssmin: { cssmin: {
options: { options: {
compatibility: 'ie8', compatibility: 'ie8',
keepSpecialComments: '*', keepSpecialComments: '*'
noAdvanced: true },
core: {
files: {
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css',
}
}, },
docs: { docs: {
src: [ src: [
...@@ -402,20 +398,31 @@ module.exports = function (grunt) { ...@@ -402,20 +398,31 @@ module.exports = function (grunt) {
// Docs HTML validation task // Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll', 'validation']); grunt.registerTask('validate-html', ['jekyll', 'validation']);
var runSubset = function (subset) {
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset;
};
var isUndefOrNonZero = function (val) {
return val === undefined || val !== '0';
};
// Test task. // Test task.
var testSubtasks = []; var testSubtasks = [];
// Skip core tests if running a different subset of the test suite // Skip core tests if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'core') { if (runSubset('core')) {
testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-html']); testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-html']);
} }
// Skip HTML validation if running a different subset of the test suite // Skip HTML validation if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') { if (runSubset('validate-html') &&
// Skip HTML5 validator on Travis when [skip validator] is in the commit message
isUndefOrNonZero(process.env.TWBS_DO_VALIDATOR)) {
testSubtasks.push('validate-html'); testSubtasks.push('validate-html');
} }
// Only run Sauce Labs tests if there's a Sauce access key // Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' && if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
// Skip Sauce if running a different subset of the test suite // Skip Sauce if running a different subset of the test suite
(!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) { runSubset('sauce-js-unit') &&
// Skip Sauce on Travis when [skip sauce] is in the commit message
isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
testSubtasks.push('connect'); testSubtasks.push('connect');
testSubtasks.push('saucelabs-qunit'); testSubtasks.push('saucelabs-qunit');
} }
...@@ -426,7 +433,7 @@ module.exports = function (grunt) { ...@@ -426,7 +433,7 @@ module.exports = function (grunt) {
// CSS distribution task. // CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']); grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'usebanner', 'csscomb', 'less:minify', 'cssmin']); grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'usebanner', 'csscomb', 'cssmin']);
// Docs distribution task. // Docs distribution task.
grunt.registerTask('dist-docs', 'copy:docs'); grunt.registerTask('dist-docs', 'copy:docs');
...@@ -435,7 +442,7 @@ module.exports = function (grunt) { ...@@ -435,7 +442,7 @@ module.exports = function (grunt) {
grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']); grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']);
// Default task. // Default task.
grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer', 'update-shrinkwrap']); grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer']);
// Version numbering task. // Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
......
...@@ -30,5 +30,4 @@ expo: http://expo.getbootstrap.com ...@@ -30,5 +30,4 @@ expo: http://expo.getbootstrap.com
cdn: cdn:
css: //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css css: //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css
css_theme: //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css css_theme: //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css
css_rtl: //netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-rtl.min.css
js: //netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js js: //netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js
...@@ -75,6 +75,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -75,6 +75,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$(el).on('click', dismiss, this.close) $(el).on('click', dismiss, this.close)
} }
Alert.VERSION = '3.1.1'
Alert.prototype.close = function (e) { Alert.prototype.close = function (e) {
var $this = $(this) var $this = $(this)
var selector = $this.attr('data-target') var selector = $this.attr('data-target')
...@@ -167,6 +169,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -167,6 +169,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.isLoading = false this.isLoading = false
} }
Button.VERSION = '3.1.1'
Button.DEFAULTS = { Button.DEFAULTS = {
loadingText: 'loading...' loadingText: 'loading...'
} }
...@@ -285,6 +289,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -285,6 +289,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
.on('mouseleave', $.proxy(this.cycle, this)) .on('mouseleave', $.proxy(this.cycle, this))
} }
Carousel.VERSION = '3.1.1'
Carousel.DEFAULTS = { Carousel.DEFAULTS = {
interval: 5000, interval: 5000,
pause: 'hover', pause: 'hover',
...@@ -488,6 +494,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -488,6 +494,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (this.options.toggle) this.toggle() if (this.options.toggle) this.toggle()
} }
Collapse.VERSION = '3.1.1'
Collapse.DEFAULTS = { Collapse.DEFAULTS = {
toggle: true toggle: true
} }
...@@ -664,6 +672,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -664,6 +672,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$(element).on('click.bs.dropdown', this.toggle) $(element).on('click.bs.dropdown', this.toggle)
} }
Dropdown.VERSION = '3.1.1'
Dropdown.prototype.toggle = function (e) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
...@@ -825,6 +835,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -825,6 +835,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
} }
} }
Modal.VERSION = '3.1.1'
Modal.DEFAULTS = { Modal.DEFAULTS = {
backdrop: true, backdrop: true,
keyboard: true, keyboard: true,
...@@ -1096,6 +1108,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1096,6 +1108,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.init('tooltip', element, options) this.init('tooltip', element, options)
} }
Tooltip.VERSION = '3.1.1'
Tooltip.DEFAULTS = { Tooltip.DEFAULTS = {
animation: true, animation: true,
placement: 'top', placement: 'top',
...@@ -1532,6 +1546,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1532,6 +1546,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.1.1'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right', placement: 'right',
trigger: 'click', trigger: 'click',
...@@ -1657,6 +1673,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1657,6 +1673,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.process() this.process()
} }
ScrollSpy.VERSION = '3.1.1'
ScrollSpy.DEFAULTS = { ScrollSpy.DEFAULTS = {
offset: 10 offset: 10
} }
...@@ -1799,6 +1817,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1799,6 +1817,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.element = $(element) this.element = $(element)
} }
Tab.VERSION = '3.1.1'
Tab.prototype.show = function () { Tab.prototype.show = function () {
var $this = this.element var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)') var $ul = $this.closest('ul:not(.dropdown-menu)')
...@@ -1822,7 +1842,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1822,7 +1842,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
var $target = $(selector) var $target = $(selector)
this.activate($this.parent('li'), $ul) this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () { this.activate($target, $target.parent(), function () {
$this.trigger({ $this.trigger({
type: 'shown.bs.tab', type: 'shown.bs.tab',
...@@ -1936,6 +1956,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1936,6 +1956,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.checkPosition() this.checkPosition()
} }
Affix.VERSION = '3.1.1'
Affix.RESET = 'affix affix-top affix-bottom' Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = { Affix.DEFAULTS = {
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -16,7 +16,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
To switch directories, type <kbd>cd</kbd> followed by the name of the directory. To switch directories, type <kbd>cd</kbd> followed by the name of the directory.
</div> </div>
{% highlight html %} {% highlight html %}
To switch directories, type <kbd>cd</kbd> followed by the name of the directory. To switch directories, type <kbd>cd</kbd> followed by the name of the directory.
{% endhighlight %} {% endhighlight %}
<h2 id="code-block">Basic block</h2> <h2 id="code-block">Basic block</h2>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../dist/js/bootstrap.min.js"></script> <script src="../dist/js/bootstrap.min.js"></script>
<script src="../assets/js/docs.min.js"></script> <script src="../assets/js/docs.min.js"></script>
{% if page.slug == "customize" %} {% if page.slug == "customize" %}
......
...@@ -173,7 +173,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { ...@@ -173,7 +173,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
<h3 id="support-android-stock-browser">Android stock browser</h3> <h3 id="support-android-stock-browser">Android stock browser</h3>
<p>Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.</p> <p>Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.</p>
<h4>Select menus</h4> <h4>Select menus</h4>
<p>On <code>&lt;select&gt;</code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. Use the snippet of code below to remove the offending CSS and render the <code>&lt;select&gt;</code> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p> <p>On <code>&lt;select&gt;</code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. (See <a href="http://stackoverflow.com/questions/14744437/html-select-box-not-showing-drop-down-arrow-on-android-version-4-0-when-set-with">this StackOverflow question</a> for details.) Use the snippet of code below to remove the offending CSS and render the <code>&lt;select&gt;</code> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p>
{% highlight html %} {% highlight html %}
<script> <script>
$(function () { $(function () {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<h3 id="download-source">Source code</h3> <h3 id="download-source">Source code</h3>
<p>Source Less, JavaScript, and font files, along with our docs. <strong>Requires a Less compiler and <a href="{{ site.repo }}#compiling-css-and-javascript">some setup.</a></strong></p> <p>Source Less, JavaScript, and font files, along with our docs. <strong>Requires a Less compiler and <a href="#grunt">some setup.</a></strong></p>
<p> <p>
<a href="{{ site.download.source }}" class="btn btn-lg btn-outline" role="button" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a> <a href="{{ site.download.source }}" class="btn btn-lg btn-outline" role="button" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
</p> </p>
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="{{ site.cdn.css }}"> <link rel="stylesheet" href="{{ site.cdn.css }}">
<!-- RTL (right-to-left) version of CSS -->
<link rel="stylesheet" href="{{ site.cdn.css_rtl }}">
<!-- Optional theme --> <!-- Optional theme -->
<link rel="stylesheet" href="{{ site.cdn.css_theme }}"> <link rel="stylesheet" href="{{ site.cdn.css_theme }}">
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<h1>Hello, world!</h1> <h1>Hello, world!</h1>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed --> <!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script> <script src="js/bootstrap.min.js"></script>
</body> </body>
......
...@@ -17,8 +17,6 @@ bootstrap/ ...@@ -17,8 +17,6 @@ bootstrap/
├── css/ ├── css/
│ ├── bootstrap.css │ ├── bootstrap.css
│ ├── bootstrap.min.css │ ├── bootstrap.min.css
│ ├── bootstrap-rtl.css
│ ├── bootstrap-rtl.min.css
│ ├── bootstrap-theme.css │ ├── bootstrap-theme.css
│ └── bootstrap-theme.min.css │ └── bootstrap-theme.min.css
├── js/ ├── js/
......
...@@ -62,6 +62,13 @@ ...@@ -62,6 +62,13 @@
<td>10</td> <td>10</td>
<td>Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and bottom directions. To provide a unique, bottom and top offset just provide an object <code>offset: { top: 10 }</code> or <code>offset: { top: 10, bottom: 5 }</code>. Use a function when you need to dynamically calculate an offset.</td> <td>Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and bottom directions. To provide a unique, bottom and top offset just provide an object <code>offset: { top: 10 }</code> or <code>offset: { top: 10, bottom: 5 }</code>. Use a function when you need to dynamically calculate an offset.</td>
</tr> </tr>
<tr>
<td>target</td>
<td>selector | node | jQuery element</td>
<td>the <code>window</code> object</td>
<td>Specifies the target element of the affix.</td>
</tr>
</tbody> </tbody>
</table> </table>
</div><!-- /.table-responsive --> </div><!-- /.table-responsive -->
......
...@@ -151,6 +151,33 @@ $('.popover-dismiss').popover({ ...@@ -151,6 +151,33 @@ $('.popover-dismiss').popover({
<td>true</td> <td>true</td>
<td>Apply a CSS fade transition to the popover</td> <td>Apply a CSS fade transition to the popover</td>
</tr> </tr>
<tr>
<td>container</td>
<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>
</td>
</tr>
<tr>
<td>content</td>
<td>string | function</td>
<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 1 argument, which is the element that the popover is attached to.</p>
</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr> <tr>
<td>html</td> <td>html</td>
<td>boolean</td> <td>boolean</td>
...@@ -169,22 +196,10 @@ $('.popover-dismiss').popover({ ...@@ -169,22 +196,10 @@ $('.popover-dismiss').popover({
<td>false</td> <td>false</td>
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td> <td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td>
</tr> </tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'click'</td>
<td>How popover is triggered - click | hover | focus | manual</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>Default title value if <code>title</code> attribute isn't present</td>
</tr>
<tr> <tr>
<td>template</td> <td>template</td>
<td>string</td> <td>string</td>
<td><code>'&lt;div class="popover"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-title"&gt;&lt;/h3&gt;&lt;div class="popover-content"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td> <td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-title"&gt;&lt;/h3&gt;&lt;div class="popover-content"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td> <td>
<p>Base HTML to use when creating the popover.</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>title</code> will be injected into the <code>.popover-title</code>.</p>
...@@ -194,30 +209,23 @@ $('.popover-dismiss').popover({ ...@@ -194,30 +209,23 @@ $('.popover-dismiss').popover({
</td> </td>
</tr> </tr>
<tr> <tr>
<td>content</td> <td>title</td>
<td>string | function</td> <td>string | function</td>
<td>''</td> <td>''</td>
<td> <td>Default title value if <code>title</code> attribute isn't present</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 1 argument, which is the element that the popover is attached to.</p>
</td>
</tr> </tr>
<tr> <tr>
<td>delay</td> <td>trigger</td>
<td>number | object</td> <td>string</td>
<td>0</td> <td>'click'</td>
<td> <td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
<p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr> </tr>
<tr> <tr>
<td>container</td> <td>viewport</td>
<td>string | false</td> <td>string | object</td>
<td>false</td> <td>{ selector: 'body', padding: 0 }</td>
<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>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ selector: '#viewport', padding: 0 }</code></p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -90,6 +90,24 @@ $('#example').tooltip(options) ...@@ -90,6 +90,24 @@ $('#example').tooltip(options)
<td>true</td> <td>true</td>
<td>Apply a CSS fade transition to the tooltip</td> <td>Apply a CSS fade transition to the tooltip</td>
</tr> </tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.</p>
</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr> <tr>
<td>html</td> <td>html</td>
<td>boolean</td> <td>boolean</td>
...@@ -106,7 +124,7 @@ $('#example').tooltip(options) ...@@ -106,7 +124,7 @@ $('#example').tooltip(options)
<td>selector</td> <td>selector</td>
<td>string</td> <td>string</td>
<td>false</td> <td>false</td>
<td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td> <td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td>
</tr> </tr>
<tr> <tr>
<td>template</td> <td>template</td>
...@@ -131,24 +149,6 @@ $('#example').tooltip(options) ...@@ -131,24 +149,6 @@ $('#example').tooltip(options)
<td>'hover focus'</td> <td>'hover focus'</td>
<td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td> <td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
</tr> </tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code></p>
</td>
</tr>
<tr> <tr>
<td>viewport</td> <td>viewport</td>
<td>string | object</td> <td>string | object</td>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/docs.min.js"></script> <script src="../../assets/js/docs.min.js"></script>
</body> </body>
......
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/docs.min.js"></script> <script src="../../assets/js/docs.min.js"></script>
</body> </body>
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/docs.min.js"></script> <script src="../../assets/js/docs.min.js"></script>
</body> </body>
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/docs.min.js"></script> <script src="../../assets/js/docs.min.js"></script>
</body> </body>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="offcanvas.js"></script> <script src="offcanvas.js"></script>
</body> </body>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
</body> </body>
</html> </html>
...@@ -643,7 +643,7 @@ ...@@ -643,7 +643,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/docs.min.js"></script> <script src="../../assets/js/docs.min.js"></script>
</body> </body>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script> <script src="../../dist/js/bootstrap.min.js"></script>
<script src="tooltip-viewport.js"></script> <script src="tooltip-viewport.js"></script>
</body> </body>
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options) this.options = $.extend({}, Affix.DEFAULTS, options)
this.$window = $(window)
this.$target = $(this.options.target)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
...@@ -27,16 +28,19 @@ ...@@ -27,16 +28,19 @@
this.checkPosition() this.checkPosition()
} }
Affix.VERSION = '3.1.1'
Affix.RESET = 'affix affix-top affix-bottom' Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = { Affix.DEFAULTS = {
offset: 0 offset: 0,
target: window
} }
Affix.prototype.getPinnedOffset = function () { Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix') this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$window.scrollTop() var scrollTop = this.$target.scrollTop()
var position = this.$element.offset() var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop) return (this.pinnedOffset = position.top - scrollTop)
} }
...@@ -49,7 +53,7 @@ ...@@ -49,7 +53,7 @@
if (!this.$element.is(':visible')) return if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height() var scrollHeight = $(document).height()
var scrollTop = this.$window.scrollTop() var scrollTop = this.$target.scrollTop()
var position = this.$element.offset() var position = this.$element.offset()
var offset = this.options.offset var offset = this.options.offset
var offsetTop = offset.top var offsetTop = offset.top
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
$(el).on('click', dismiss, this.close) $(el).on('click', dismiss, this.close)
} }
Alert.VERSION = '3.1.1'
Alert.prototype.close = function (e) { Alert.prototype.close = function (e) {
var $this = $(this) var $this = $(this)
var selector = $this.attr('data-target') var selector = $this.attr('data-target')
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
this.isLoading = false this.isLoading = false
} }
Button.VERSION = '3.1.1'
Button.DEFAULTS = { Button.DEFAULTS = {
loadingText: 'loading...' loadingText: 'loading...'
} }
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
.on('mouseleave', $.proxy(this.cycle, this)) .on('mouseleave', $.proxy(this.cycle, this))
} }
Carousel.VERSION = '3.1.1'
Carousel.DEFAULTS = { Carousel.DEFAULTS = {
interval: 5000, interval: 5000,
pause: 'hover', pause: 'hover',
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
if (this.options.toggle) this.toggle() if (this.options.toggle) this.toggle()
} }
Collapse.VERSION = '3.1.1'
Collapse.DEFAULTS = { Collapse.DEFAULTS = {
toggle: true toggle: true
} }
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
$(element).on('click.bs.dropdown', this.toggle) $(element).on('click.bs.dropdown', this.toggle)
} }
Dropdown.VERSION = '3.1.1'
Dropdown.prototype.toggle = function (e) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
} }
} }
Modal.VERSION = '3.1.1'
Modal.DEFAULTS = { Modal.DEFAULTS = {
backdrop: true, backdrop: true,
keyboard: true, keyboard: true,
...@@ -267,7 +269,7 @@ ...@@ -267,7 +269,7 @@
if ($this.is('a')) e.preventDefault() if ($this.is('a')) e.preventDefault()
Plugin.call($target, option, this) Plugin.call($target, option, this)
$target.one('hide', function () { $target.one('hide.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus') $this.is(':visible') && $this.trigger('focus')
}) })
}) })
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.1.1'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right', placement: 'right',
trigger: 'click', trigger: 'click',
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
this.process() this.process()
} }
ScrollSpy.VERSION = '3.1.1'
ScrollSpy.DEFAULTS = { ScrollSpy.DEFAULTS = {
offset: 10 offset: 10
} }
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
this.element = $(element) this.element = $(element)
} }
Tab.VERSION = '3.1.1'
Tab.prototype.show = function () { Tab.prototype.show = function () {
var $this = this.element var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)') var $ul = $this.closest('ul:not(.dropdown-menu)')
...@@ -40,7 +42,7 @@ ...@@ -40,7 +42,7 @@
var $target = $(selector) var $target = $(selector)
this.activate($this.parent('li'), $ul) this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () { this.activate($target, $target.parent(), function () {
$this.trigger({ $this.trigger({
type: 'shown.bs.tab', type: 'shown.bs.tab',
......
...@@ -19,7 +19,7 @@ $(function () { ...@@ -19,7 +19,7 @@ $(function () {
}) })
test('should provide no conflict', function () { test('should provide no conflict', function () {
ok(!$.fn.modal, 'modal was set back to undefined (org value)') ok(!$.fn.modal, 'modal was set back to undefined (orig value)')
}) })
test('should return element', function () { test('should return element', function () {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
this.init('tooltip', element, options) this.init('tooltip', element, options)
} }
Tooltip.VERSION = '3.1.1'
Tooltip.DEFAULTS = { Tooltip.DEFAULTS = {
animation: true, animation: true,
placement: 'top', placement: 'top',
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
.resizable(@direction) { .resizable(@direction) {
resize: @direction; // Options: horizontal, vertical, both resize: @direction; // Options: horizontal, vertical, both
overflow: auto; // Safari fix overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
} }
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
// For more information, see the following: // For more information, see the following:
// //
// Issue: https://github.com/twbs/bootstrap/issues/10497 // Issue: https://github.com/twbs/bootstrap/issues/10497
// Docs: http://getbootstrap.com/getting-started/#browsers // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
@-ms-viewport { @-ms-viewport {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment