mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Refactor appointment model and views to use a single date field; update tooltip and calendar display for improved functionality
This commit is contained in:
1 parent
88a40b356c
commit
86533981bc
8 files changed
+66
-76
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