mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-04 04:40:43 -04:00
Add duration field to appointments and enhance calendar tooltip functionality
This commit is contained in:
1 parent
83cdbe7c7c
commit
c481879dd8
7 files changed
+187
-34
No files matched your search
@@ -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');
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user