mirror of
https://github.com/itflow-org/itflow
synced 2026-08-30 19:35:12 +00:00
Theme Fixes for adminlte 4
This commit is contained in:
@@ -194,7 +194,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
||||
allDayToggle.checked = true;
|
||||
$(allDayToggle).trigger("change");
|
||||
}
|
||||
$("#addCalendarEventModal").modal();
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('addCalendarEventModal')).show();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -274,7 +274,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
|
||||
}
|
||||
|
||||
calendar.unselect();
|
||||
$("#addCalendarEventModal").modal();
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('addCalendarEventModal')).show();
|
||||
},
|
||||
eventClick: function(editEvent) {
|
||||
var eventId = editEvent.event.id;
|
||||
|
||||
@@ -967,7 +967,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])
|
||||
function openModal(index) {
|
||||
currentIndex = index;
|
||||
updateModalContent();
|
||||
$('#viewFileModal').modal('show');
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('viewFileModal')).show();
|
||||
}
|
||||
|
||||
function updateModalContent() {
|
||||
|
||||
@@ -10,11 +10,12 @@ function showPasswordViaCredentialID(button, credential_id) {
|
||||
|
||||
// (Re)create the popover with the fetched password and show it
|
||||
// trigger: focus dismisses it when the user clicks away
|
||||
jQuery(button).popover('dispose').popover({
|
||||
bootstrap.Popover.getInstance(button)?.dispose();
|
||||
new bootstrap.Popover(button, {
|
||||
content: credential.password,
|
||||
placement: 'top',
|
||||
trigger: 'focus'
|
||||
}).popover('show');
|
||||
}).show();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -116,17 +116,20 @@ $data = "otpauth://totp/ITFlow:$session_email?secret=$token";
|
||||
// on screen. This page is standalone and does not load js/app.js, so it
|
||||
// carries its own copy of the helper.
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -144,7 +147,9 @@ $data = "otpauth://totp/ITFlow:$session_email?secret=$token";
|
||||
|
||||
// Enable Popovers
|
||||
$(function () {
|
||||
$('[data-bs-toggle="popover"]').popover()
|
||||
document.querySelectorAll('[data-bs-toggle="popover"]').forEach(function (el) {
|
||||
bootstrap.Popover.getOrCreateInstance(el);
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -87,7 +87,7 @@ if (!empty($_SESSION['show_mfa_modal'])) {
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// jQuery or vanilla JS to open the modal
|
||||
$('#enableMFAModal').modal('show');
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('enableMFAModal')).show();
|
||||
});
|
||||
</script>";
|
||||
unset($_SESSION['show_mfa_modal']);
|
||||
|
||||
Reference in New Issue
Block a user