From e3210f227b609bc7211faf897aae5a08882c19fb Mon Sep 17 00:00:00 2001 From: Ivymaster Date: Thu, 24 Sep 2026 15:53:09 +0200 Subject: [PATCH] BUG: Fixed issue with unuseable collapsed columns in tempus calender --- public/css/Tempus_print.css | 14 ++++++++++---- public/js/components/Calendar/Base/Grid.js | 3 ++- .../js/components/Calendar/Mode/MultipleWeeks.js | 10 +++++++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/public/css/Tempus_print.css b/public/css/Tempus_print.css index 51dc00b3c..28b767c0f 100644 --- a/public/css/Tempus_print.css +++ b/public/css/Tempus_print.css @@ -34,7 +34,9 @@ header, .fhc-calendar-mode-week #rangePresetSelector, .fhc-calendar-base-grid-dropzone, .fhc-calendar-base-grid .main-header .form-check, -.fhc-calendar-base-grid-line-background { +.fhc-calendar-base-grid-line-background, +.fhc-calendar-base-grid-line-background > div, +.p-tooltip{ display: none !important; } @@ -68,14 +70,18 @@ header, .fhc-calendar-mode-week .fhc-calendar-mode-week-view, .fhc-calendar-mode-week .fhc-calendar-mode-week-view > div { width: 100% !important; - height: auto !important; + height: 100vh !important; min-width: 0 !important; overflow: visible !important; } .fhc-calendar-mode-week .fhc-calendar-mode-week-view > div { - width: var(--fhc-calendar-print-layout-width, max-content) !important; - zoom: var(--fhc-calendar-print-scale, 1) !important; + width: var(--fhc-calendar-print-layout-width, 100%) !important; + transform: scale( + var(--fhc-calendar-print-scale-x, 1), + var(--fhc-calendar-print-scale-y, 1) + ) !important; + transform-origin: top left !important; } .fhc-calendar-print-measure { diff --git a/public/js/components/Calendar/Base/Grid.js b/public/js/components/Calendar/Base/Grid.js index d158fde7d..0b8c1a730 100644 --- a/public/js/components/Calendar/Base/Grid.js +++ b/public/js/components/Calendar/Base/Grid.js @@ -233,9 +233,10 @@ export default { showAllDaysEqually ? equalDayWidth : isManuallyCollapsed(index) - ? Math.max(width * 0.1, equalDayWidth) + ? (width * 0.1 < 100 ? 100 : width * 0.1) : width, ); + const fraction = isManuallyCollapsed(index) ? '0.1fr' : '1fr'; return `minmax(${minWidth}px, ${fraction})`; }) diff --git a/public/js/components/Calendar/Mode/MultipleWeeks.js b/public/js/components/Calendar/Mode/MultipleWeeks.js index 989e279b1..c26def55c 100644 --- a/public/js/components/Calendar/Mode/MultipleWeeks.js +++ b/public/js/components/Calendar/Mode/MultipleWeeks.js @@ -182,7 +182,8 @@ export default { const weeks = Array.from(view.children); weeks.forEach(week => { - week.style.setProperty('--fhc-calendar-print-scale', '1'); + week.style.setProperty('--fhc-calendar-print-scale-x', '1'); + week.style.setProperty('--fhc-calendar-print-scale-y', '1'); week.style.setProperty('--fhc-calendar-print-layout-width', 'max-content'); }); @@ -215,8 +216,10 @@ export default { return; const scale = Math.min(1, availableWidth / (gridWidth)); + const verticalScale = 1 - (1 - scale) * 0.9; - week.style.setProperty('--fhc-calendar-print-scale', scale.toFixed(4)); + week.style.setProperty('--fhc-calendar-print-scale-x', scale.toFixed(4)); + week.style.setProperty('--fhc-calendar-print-scale-y', verticalScale.toFixed(4)); week.style.setProperty('--fhc-calendar-print-layout-width', gridWidth + 'px'); }); }, @@ -226,7 +229,8 @@ export default { return; Array.from(view.children).forEach(week => { - week.style.removeProperty('--fhc-calendar-print-scale'); + week.style.removeProperty('--fhc-calendar-print-scale-x'); + week.style.removeProperty('--fhc-calendar-print-scale-y'); week.style.removeProperty('--fhc-calendar-print-layout-width'); }); },