Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2019-02-23 01:37:55 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-02-26 14:04:04 +0300
commit8a37045b798fd66ede9c68774f9bb657e28d956a (patch)
tree35a1cf1b26701975f9732e99553e53fb295678c7 /site/docs/4.3
parent8affe84c722bc459e7152e57d36a4f515f537abf (diff)
move util in a util folder with the sanitizer
Diffstat (limited to 'site/docs/4.3')
-rw-r--r--site/docs/4.3/assets/js/src/application.js26
-rw-r--r--site/docs/4.3/getting-started/javascript.md6
-rw-r--r--site/docs/4.3/getting-started/webpack.md1
3 files changed, 15 insertions, 18 deletions
diff --git a/site/docs/4.3/assets/js/src/application.js b/site/docs/4.3/assets/js/src/application.js
index 24b633bec1..01f4f55db6 100644
--- a/site/docs/4.3/assets/js/src/application.js
+++ b/site/docs/4.3/assets/js/src/application.js
@@ -15,20 +15,24 @@
(function () {
'use strict'
+ function makeArray(list) {
+ return [].slice.call(list)
+ }
+
// Tooltip and popover demos
- bootstrap.Util.makeArray(document.querySelectorAll('.tooltip-demo'))
+ makeArray(document.querySelectorAll('.tooltip-demo'))
.forEach(function (tooltip) {
new bootstrap.Tooltip(tooltip, {
selector: '[data-toggle="tooltip"]'
})
})
- bootstrap.Util.makeArray(document.querySelectorAll('[data-toggle="popover"]'))
+ makeArray(document.querySelectorAll('[data-toggle="popover"]'))
.forEach(function (popover) {
new bootstrap.Popover(popover)
})
- bootstrap.Util.makeArray(document.querySelectorAll('.toast'))
+ makeArray(document.querySelectorAll('.toast'))
.forEach(function (toastNode) {
var toast = new bootstrap.Toast(toastNode, {
autohide: false
@@ -38,24 +42,24 @@
})
// Demos within modals
- bootstrap.Util.makeArray(document.querySelectorAll('.tooltip-test'))
+ makeArray(document.querySelectorAll('.tooltip-test'))
.forEach(function (tooltip) {
new bootstrap.Tooltip(tooltip)
})
- bootstrap.Util.makeArray(document.querySelectorAll('.popover-test'))
+ makeArray(document.querySelectorAll('.popover-test'))
.forEach(function (popover) {
new bootstrap.Popover(popover)
})
// Indeterminate checkbox example
- bootstrap.Util.makeArray(document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]'))
+ makeArray(document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]'))
.forEach(function (checkbox) {
checkbox.indeterminate = true
})
// Disable empty links in docs examples
- bootstrap.Util.makeArray(document.querySelectorAll('.bd-content [href="#"]'))
+ makeArray(document.querySelectorAll('.bd-content [href="#"]'))
.forEach(function (link) {
link.addEventListener('click', function (e) {
e.preventDefault()
@@ -79,7 +83,7 @@
}
// Activate animated progress bar
- bootstrap.Util.makeArray(document.querySelectorAll('.bd-toggle-animated-progress > .progress-bar-striped'))
+ makeArray(document.querySelectorAll('.bd-toggle-animated-progress > .progress-bar-striped'))
.forEach(function (progressBar) {
progressBar.addEventListener('click', function () {
if (progressBar.classList.contains('progress-bar-animated')) {
@@ -92,12 +96,12 @@
// Insert copy to clipboard button before .highlight
var btnHtml = '<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>'
- bootstrap.Util.makeArray(document.querySelectorAll('figure.highlight, div.highlight'))
+ makeArray(document.querySelectorAll('figure.highlight, div.highlight'))
.forEach(function (element) {
element.insertAdjacentHTML('beforebegin', btnHtml)
})
- bootstrap.Util.makeArray(document.querySelectorAll('.btn-clipboard'))
+ makeArray(document.querySelectorAll('.btn-clipboard'))
.forEach(function (btn) {
var tooltipBtn = new bootstrap.Tooltip(btn)
@@ -146,7 +150,7 @@
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
// Wrap inner
- bootstrap.Util.makeArray(document.querySelectorAll('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5'))
+ makeArray(document.querySelectorAll('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5'))
.forEach(function (hEl) {
hEl.innerHTML = '<span class="bd-content-title">' + hEl.innerHTML + '</span>'
})
diff --git a/site/docs/4.3/getting-started/javascript.md b/site/docs/4.3/getting-started/javascript.md
index 9dd61aa55d..5659f6f936 100644
--- a/site/docs/4.3/getting-started/javascript.md
+++ b/site/docs/4.3/getting-started/javascript.md
@@ -134,12 +134,6 @@ Bootstrap's plugins don't fall back particularly gracefully when JavaScript is d
{% endcapture %}
{% include callout.html content=callout type="warning" %}
-## Util
-
-All Bootstrap's JavaScript files depend on `util.js` and it has to be included alongside the other JavaScript files. If you're using the compiled (or minified) `bootstrap.js`, there is no need to include this—it's already there.
-
-`util.js` includes utility functions and a basic helper for `transitionEnd` events as well as a CSS transition emulator. It's used by the other plugins to check for CSS transition support and to catch hanging transitions.
-
## Sanitizer
Tooltips and Popovers use our built-in sanitizer to sanitize options which accept HTML.
diff --git a/site/docs/4.3/getting-started/webpack.md b/site/docs/4.3/getting-started/webpack.md
index 299cdf9b16..b8c5f8a0da 100644
--- a/site/docs/4.3/getting-started/webpack.md
+++ b/site/docs/4.3/getting-started/webpack.md
@@ -21,7 +21,6 @@ import 'bootstrap';
Alternatively, you may **import plugins individually** as needed:
{% highlight js %}
-import 'bootstrap/js/dist/util';
import 'bootstrap/js/dist/alert';
...
{% endhighlight %}