Add duration field to appointments and enhance calendar tooltip functionality

This commit is contained in:
ricky committed 2026-08-06 21:24:54 -04:00
1 parent 83cdbe7c7c
commit c481879dd8
7 files changed
+187 -34

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('click', function(e) {
const clickedBlock = e.target.closest('.appointment-block');
const clickedLink = e.target.closest('a');
// Allow standard links (like subject title or avatar links) to navigate normally
if (clickedLink) return;
// Close any other open tooltips across the calendar
document.querySelectorAll('.appointment-block.open').forEach(function(block) {
if (block !== clickedBlock) {
block.classList.remove('open');
}
});
// Toggle the clicked appointment block's tooltip
if (clickedBlock) {
e.stopPropagation();
clickedBlock.classList.toggle('open');
}
});
});