Adds date-based column retrieval

Adds a method to retrieve column bounds based on a given date, enhancing date-specific event placement.

Removes unnecessary data storage for overflow event titles, simplifying overflow event handling.
This commit is contained in:
Janus C. H. Knudsen 2025-09-30 23:45:07 +02:00
parent 67dfb6e894
commit 6a17bba343
2 changed files with 18 additions and 8 deletions

View file

@ -551,11 +551,7 @@ export class AllDayManager {
const gridRow = parseInt(event.style.gridRow) || 1;
if (gridRow === 4) {
// Store original content before converting to indicator
if (!event.dataset.originalTitle) {
event.dataset.originalTitle = event.dataset.title || event.innerHTML;
}
// Convert row 4 events to indicators
const overflowCount = this.actualRowCount - 3; // Total overflow rows
event.classList.add('max-event-overflow');
@ -586,9 +582,7 @@ export class AllDayManager {
// Restore original title from data-title
if (htmlEvent.dataset.title) {
htmlEvent.innerHTML = htmlEvent.dataset.title;
} else if (htmlEvent.dataset.originalTitle) {
htmlEvent.innerHTML = htmlEvent.dataset.originalTitle;
}
}
});
// Show all hidden events