diff options
author | Mario <mario@mariovavti.com> | 2021-09-22 06:38:27 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-22 06:38:27 +0000 |
commit | 89e4006b2d84d398e34d407a019854823b1dd37d (patch) | |
tree | eed215c505af2395952b474917a92584f9e1866a /vendor/twbs/bootstrap/site/assets/js | |
parent | 26ac452c96ce499c140bcbae78643b8fe39b4243 (diff) | |
download | volse-hubzilla-89e4006b2d84d398e34d407a019854823b1dd37d.tar.gz volse-hubzilla-89e4006b2d84d398e34d407a019854823b1dd37d.tar.bz2 volse-hubzilla-89e4006b2d84d398e34d407a019854823b1dd37d.zip |
composer update bootstrap to version 5.1.1
Diffstat (limited to 'vendor/twbs/bootstrap/site/assets/js')
-rw-r--r-- | vendor/twbs/bootstrap/site/assets/js/application.js | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/vendor/twbs/bootstrap/site/assets/js/application.js b/vendor/twbs/bootstrap/site/assets/js/application.js index 6ff316056..dd9162e40 100644 --- a/vendor/twbs/bootstrap/site/assets/js/application.js +++ b/vendor/twbs/bootstrap/site/assets/js/application.js @@ -58,6 +58,22 @@ }) } + var alertPlaceholder = document.getElementById('liveAlertPlaceholder') + var alertTrigger = document.getElementById('liveAlertBtn') + + function alert(message, type) { + var wrapper = document.createElement('div') + wrapper.innerHTML = '<div class="alert alert-' + type + ' alert-dismissible" role="alert">' + message + '<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>' + + alertPlaceholder.append(wrapper) + } + + if (alertTrigger) { + alertTrigger.addEventListener('click', function () { + alert('Nice, you triggered this alert message!', 'success') + }) + } + // Demos within modals document.querySelectorAll('.tooltip-test') .forEach(function (tooltip) { @@ -101,17 +117,6 @@ }) } - // Activate animated progress bar - var btnToggleAnimatedProgress = document.getElementById('btnToggleAnimatedProgress') - if (btnToggleAnimatedProgress) { - btnToggleAnimatedProgress.addEventListener('click', function () { - btnToggleAnimatedProgress.parentNode - .querySelector('.progress-bar-striped') - .classList - .toggle('progress-bar-animated') - }) - } - // 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>' document.querySelectorAll('div.highlight') |