Theme Fixes for adminlte 4

This commit is contained in:
johnnyq
2026-08-14 14:11:13 -04:00
parent e6da3fd0e3
commit 0fe6d51bdb
12 changed files with 200 additions and 35 deletions

View File

@@ -427,7 +427,9 @@ $(document).ready(function() {
// Enable Popovers
$(function() {
$('[data-bs-toggle="popover"]').popover();
document.querySelectorAll('[data-bs-toggle="popover"]').forEach(function (el) {
bootstrap.Popover.getOrCreateInstance(el);
});
});
// Data Tables
@@ -538,16 +540,19 @@ $(document).off('change.itflowEventTime').on('change.itflowEventTime', '.event-s
* until the next page load.
*/
function flashTooltip(button, message) {
$(button)
.tooltip('dispose')
.tooltip({
trigger: 'manual',
placement: 'bottom',
title: message
})
.tooltip('show');
const el = button instanceof Element ? button : $(button)[0];
if (!el) {
return;
}
bootstrap.Tooltip.getInstance(el)?.dispose();
const tip = new bootstrap.Tooltip(el, {
trigger: 'manual',
placement: 'bottom',
title: message
});
tip.show();
setTimeout(function() {
$(button).tooltip('dispose');
setTimeout(function () {
tip.dispose();
}, 1000);
}