mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 09:04:14 +02:00
update to 4.2.1
This commit is contained in:
22
docs/4.2/assets/js/docs.min.js
vendored
Normal file
22
docs/4.2/assets/js/docs.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
112
docs/4.2/assets/js/src/application.js
Normal file
112
docs/4.2/assets/js/src/application.js
Normal file
@@ -0,0 +1,112 @@
|
||||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
/*!
|
||||
* JavaScript for Bootstrap's docs (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see https://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
|
||||
/* global ClipboardJS: false, anchors: false, bsCustomFileInput: false */
|
||||
|
||||
(function ($) {
|
||||
'use strict'
|
||||
|
||||
$(function () {
|
||||
// Tooltip and popover demos
|
||||
$('.tooltip-demo').tooltip({
|
||||
selector: '[data-toggle="tooltip"]',
|
||||
container: 'body'
|
||||
})
|
||||
|
||||
$('[data-toggle="popover"]').popover()
|
||||
|
||||
$('.toast')
|
||||
.toast({
|
||||
autohide: false
|
||||
})
|
||||
.toast('show')
|
||||
|
||||
// Demos within modals
|
||||
$('.tooltip-test').tooltip()
|
||||
$('.popover-test').popover()
|
||||
|
||||
// Indeterminate checkbox example
|
||||
$('.bd-example-indeterminate [type="checkbox"]').prop('indeterminate', true)
|
||||
|
||||
// Disable empty links in docs examples
|
||||
$('.bd-content [href="#"]').click(function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
// Modal relatedTarget demo
|
||||
$('#exampleModal').on('show.bs.modal', function (event) {
|
||||
var $button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var recipient = $button.data('whatever') // Extract info from data-* attributes
|
||||
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
|
||||
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
|
||||
var $modal = $(this)
|
||||
$modal.find('.modal-title').text('New message to ' + recipient)
|
||||
$modal.find('.modal-body input').val(recipient)
|
||||
})
|
||||
|
||||
// Activate animated progress bar
|
||||
$('.bd-toggle-animated-progress').on('click', function () {
|
||||
$(this).siblings('.progress').find('.progress-bar-striped').toggleClass('progress-bar-animated')
|
||||
})
|
||||
|
||||
// Insert copy to clipboard button before .highlight
|
||||
$('figure.highlight, div.highlight').each(function () {
|
||||
var btnHtml = '<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>'
|
||||
$(this).before(btnHtml)
|
||||
$('.btn-clipboard')
|
||||
.tooltip()
|
||||
.on('mouseleave', function () {
|
||||
// Explicitly hide tooltip, since after clicking it remains
|
||||
// focused (as it's a button), so tooltip would otherwise
|
||||
// remain visible until focus is moved away
|
||||
$(this).tooltip('hide')
|
||||
})
|
||||
})
|
||||
|
||||
var clipboard = new ClipboardJS('.btn-clipboard', {
|
||||
target: function (trigger) {
|
||||
return trigger.parentNode.nextElementSibling
|
||||
}
|
||||
})
|
||||
|
||||
clipboard.on('success', function (e) {
|
||||
$(e.trigger)
|
||||
.attr('title', 'Copied!')
|
||||
.tooltip('_fixTitle')
|
||||
.tooltip('show')
|
||||
.attr('title', 'Copy to clipboard')
|
||||
.tooltip('_fixTitle')
|
||||
|
||||
e.clearSelection()
|
||||
})
|
||||
|
||||
clipboard.on('error', function (e) {
|
||||
var modifierKey = /Mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-'
|
||||
var fallbackMsg = 'Press ' + modifierKey + 'C to copy'
|
||||
|
||||
$(e.trigger)
|
||||
.attr('title', fallbackMsg)
|
||||
.tooltip('_fixTitle')
|
||||
.tooltip('show')
|
||||
.attr('title', 'Copy to clipboard')
|
||||
.tooltip('_fixTitle')
|
||||
})
|
||||
|
||||
anchors.options = {
|
||||
icon: '#'
|
||||
}
|
||||
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
|
||||
$('.bd-content').children('h2, h3, h4, h5').wrapInner('<span class="bd-content-title"></span>')
|
||||
|
||||
bsCustomFileInput.init()
|
||||
})
|
||||
}(jQuery))
|
47
docs/4.2/assets/js/src/ie-emulation-modes-warning.js
Normal file
47
docs/4.2/assets/js/src/ie-emulation-modes-warning.js
Normal file
@@ -0,0 +1,47 @@
|
||||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
|
||||
(function () {
|
||||
'use strict'
|
||||
|
||||
function emulatedIEMajorVersion() {
|
||||
var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
|
||||
if (groups === null) {
|
||||
return null
|
||||
}
|
||||
var ieVersionNum = parseInt(groups[1], 10)
|
||||
var ieMajorVersion = Math.floor(ieVersionNum)
|
||||
return ieMajorVersion
|
||||
}
|
||||
|
||||
function actualNonEmulatedIEMajorVersion() {
|
||||
// Detects the actual version of IE in use, even if it's in an older-IE emulation mode.
|
||||
// IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx
|
||||
// @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx
|
||||
var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // eslint-disable-line no-new-func
|
||||
if (typeof jscriptVersion === 'undefined') {
|
||||
return 11 // IE11+ not in emulation mode
|
||||
}
|
||||
if (jscriptVersion < 9) {
|
||||
return 8 // IE8 (or lower; haven't tested on IE<8)
|
||||
}
|
||||
return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
|
||||
}
|
||||
|
||||
var ua = window.navigator.userAgent
|
||||
if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
|
||||
return // Opera, which might pretend to be IE
|
||||
}
|
||||
var emulated = emulatedIEMajorVersion()
|
||||
if (emulated === null) {
|
||||
return // Not IE
|
||||
}
|
||||
var nonEmulated = actualNonEmulatedIEMajorVersion()
|
||||
|
||||
if (emulated !== nonEmulated) {
|
||||
// eslint-disable-next-line no-alert
|
||||
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
|
||||
}
|
||||
}())
|
55
docs/4.2/assets/js/src/search.js
Normal file
55
docs/4.2/assets/js/src/search.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
(function () {
|
||||
'use strict'
|
||||
|
||||
if (!window.docsearch) {
|
||||
return
|
||||
}
|
||||
|
||||
var inputElement = document.getElementById('search-input')
|
||||
var siteDocsVersion = inputElement.getAttribute('data-docs-version')
|
||||
|
||||
function getOrigin() {
|
||||
var location = window.location
|
||||
var origin = location.origin
|
||||
|
||||
if (!origin) {
|
||||
var port = location.port ? ':' + location.port : ''
|
||||
|
||||
origin = location.protocol + '//' + location.hostname + port
|
||||
}
|
||||
|
||||
return origin
|
||||
}
|
||||
|
||||
window.docsearch({
|
||||
apiKey: '5990ad008512000bba2cf951ccf0332f',
|
||||
indexName: 'bootstrap',
|
||||
inputSelector: '#search-input',
|
||||
algoliaOptions: {
|
||||
facetFilters: ['version:' + siteDocsVersion]
|
||||
},
|
||||
transformData: function (hits) {
|
||||
return hits.map(function (hit) {
|
||||
var siteurl = getOrigin()
|
||||
var urlRE = /^https?:\/\/getbootstrap\.com/
|
||||
|
||||
// When in production, return the result as is,
|
||||
// otherwise remove our url from it.
|
||||
hit.url = siteurl.match(urlRE) ? hit.url : hit.url.replace(urlRE, '')
|
||||
|
||||
// Prevent jumping to first header
|
||||
if (hit.anchor === 'content') {
|
||||
hit.url = hit.url.replace(/#content$/, '')
|
||||
hit.anchor = null
|
||||
}
|
||||
|
||||
return hit
|
||||
})
|
||||
},
|
||||
debug: false // Set debug to true if you want to inspect the dropdown
|
||||
})
|
||||
}())
|
6
docs/4.2/assets/js/vendor/anchor.min.js
vendored
Normal file
6
docs/4.2/assets/js/vendor/anchor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
docs/4.2/assets/js/vendor/bs-custom-file-input.min.js
vendored
Normal file
7
docs/4.2/assets/js/vendor/bs-custom-file-input.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* bsCustomFileInput v1.3.1 (https://github.com/Johann-S/bs-custom-file-input)
|
||||
* Copyright 2018 Johann-S <johann.servoire@gmail.com>
|
||||
* Licensed under MIT (https://github.com/Johann-S/bs-custom-file-input/blob/master/LICENSE)
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.bsCustomFileInput=t()}(this,function(){"use strict";var d={CUSTOMFILE:'.custom-file input[type="file"]',CUSTOMFILELABEL:".custom-file-label",FORM:"form",INPUT:"input"},r=function(e){if(0<e.childNodes.length)for(var t=[].slice.call(e.childNodes),n=0;n<t.length;n++){var r=t[n];if(3!==r.nodeType)return r}return e},u=function(e){var t=e.bsCustomFileInput.defaultText,n=e.parentNode.querySelector(d.CUSTOMFILELABEL);n&&(r(n).innerHTML=t)},n=!!window.File,l=function(e){if(e.hasAttribute("multiple")&&n)return[].slice.call(e.files).map(function(e){return e.name}).join(", ");if(-1===e.value.indexOf("fakepath"))return e.value;var t=e.value.split("\\");return t[t.length-1]};function v(){var e=this.parentNode.querySelector(d.CUSTOMFILELABEL);if(e){var t=r(e),n=l(this);n.length?t.innerHTML=n:u(this)}}function p(){for(var e=[].slice.call(this.querySelectorAll(d.INPUT)).filter(function(e){return!!e.bsCustomFileInput}),t=0,n=e.length;t<n;t++)u(e[t])}var m="bsCustomFileInput",L="reset",h="change";return{init:function(e,t){void 0===e&&(e=d.CUSTOMFILE),void 0===t&&(t=d.FORM);for(var n,r,l,i=[].slice.call(document.querySelectorAll(e)),o=[].slice.call(document.querySelectorAll(t)),u=0,c=i.length;u<c;u++){var f=i[u];Object.defineProperty(f,m,{value:{defaultText:(n=f,r=void 0,void 0,r="",l=n.parentNode.querySelector(d.CUSTOMFILELABEL),l&&(r=l.innerHTML),r)},writable:!0}),f.addEventListener(h,v)}for(var a=0,s=o.length;a<s;a++)o[a].addEventListener(L,p),Object.defineProperty(o[a],m,{value:!0,writable:!0})},destroy:function(){for(var e=[].slice.call(document.querySelectorAll(d.FORM)).filter(function(e){return!!e.bsCustomFileInput}),t=[].slice.call(document.querySelectorAll(d.INPUT)).filter(function(e){return!!e.bsCustomFileInput}),n=0,r=t.length;n<r;n++){var l=t[n];u(l),l[m]=void 0,l.removeEventListener(h,v)}for(var i=0,o=e.length;i<o;i++)e[i].removeEventListener(L,p),e[i][m]=void 0}}});
|
||||
//# sourceMappingURL=bs-custom-file-input.min.js.map
|
7
docs/4.2/assets/js/vendor/clipboard.min.js
vendored
Normal file
7
docs/4.2/assets/js/vendor/clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
docs/4.2/assets/js/vendor/jquery-slim.min.js
vendored
Normal file
2
docs/4.2/assets/js/vendor/jquery-slim.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user