mirror of
https://github.com/itflow-org/itflow
synced 2026-09-20 21:51:16 +00:00
Offset background color fix datepciker empty right column
This commit is contained in:
@@ -42,7 +42,7 @@ header("X-Frame-Options: DENY"); // Legacy
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="theme-<?= escapeHtml($config_theme) ?>" data-lte-primary="<?= escapeHtml($config_theme) ?>">
|
<body class="bg-body-tertiary theme-<?= escapeHtml($config_theme) ?>" data-lte-primary="<?= escapeHtml($config_theme) ?>">
|
||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
|
|
||||||
|
|||||||
@@ -409,20 +409,54 @@ a:focus {
|
|||||||
/* --- Flatpickr date-filter preset panel ---------------------------------
|
/* --- Flatpickr date-filter preset panel ---------------------------------
|
||||||
Flatpickr has no preset-ranges feature; js/date_filter.js injects this
|
Flatpickr has no preset-ranges feature; js/date_filter.js injects this
|
||||||
panel to reproduce the nine ranges daterangepicker used to provide. */
|
panel to reproduce the nine ranges daterangepicker used to provide. */
|
||||||
.flatpickr-calendar.itflow-fp-with-ranges {
|
/* The panel sits in a second column to the right of the month grid. This has to
|
||||||
|
be a GRID rather than flex: .flatpickr-calendar's own children are the month
|
||||||
|
nav and the day grid STACKED, so flexing the container would put those two
|
||||||
|
side by side as well. Two explicit columns keep flatpickr's own stacking in
|
||||||
|
column 1 and give the panel column 2, spanning both rows.
|
||||||
|
|
||||||
|
width:auto is safe in this layout but was NOT when the panel ran along the
|
||||||
|
bottom. The calendar is position:absolute, so auto means shrink-to-fit, which
|
||||||
|
resolves to max-content - and max-content for a horizontal row of nine nowrap
|
||||||
|
buttons is one long line that flex-wrap never breaks, while .flatpickr-days
|
||||||
|
keeps its own fixed 307.875px. Everything past the month grid then rendered as
|
||||||
|
an empty second pane. Stacked in a column the panel's max-content is just the
|
||||||
|
widest single label, so the container comes out calendar + panel wide.
|
||||||
|
|
||||||
|
The `> *` rule catches anything flatpickr adds later - an unplaced child would
|
||||||
|
otherwise auto-flow into column 2 and land on top of the panel. */
|
||||||
|
.flatpickr-calendar.itflow-fp-with-ranges.open {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: max-content max-content;
|
||||||
|
grid-template-rows: auto auto;
|
||||||
|
align-items: start;
|
||||||
width: auto;
|
width: auto;
|
||||||
padding-right: 0;
|
}
|
||||||
|
.flatpickr-calendar.itflow-fp-with-ranges > * {
|
||||||
|
grid-column: 1;
|
||||||
|
}
|
||||||
|
.flatpickr-calendar.itflow-fp-with-ranges > .itflow-fp-ranges {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 1 / span 2;
|
||||||
|
/* stretch so the divider runs the calendar's full height, not just the
|
||||||
|
height of the nine buttons */
|
||||||
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.itflow-fp-ranges {
|
.itflow-fp-ranges {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-direction: column;
|
||||||
gap: .25rem;
|
gap: .125rem;
|
||||||
padding: .5rem;
|
padding: .5rem;
|
||||||
border-top: 1px solid var(--bs-border-color, #dee2e6);
|
border-left: 1px solid var(--bs-border-color, #dee2e6);
|
||||||
}
|
}
|
||||||
.itflow-fp-range {
|
.itflow-fp-range {
|
||||||
padding: .2rem .5rem;
|
padding: .2rem .5rem;
|
||||||
font-size: .8125rem;
|
font-size: .8125rem;
|
||||||
|
/* .flatpickr-calendar sets line-height:24px and it inherits. Nine buttons at
|
||||||
|
that height overshoot the calendar's own ~296px; 1.4 brings the column back
|
||||||
|
under it so the two sides finish level. */
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: left;
|
||||||
color: var(--itflow-accent, #007bff);
|
color: var(--itflow-accent, #007bff);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: none;
|
background: none;
|
||||||
|
|||||||
@@ -36,5 +36,5 @@
|
|||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="layout-fixed theme-<?= escapeHtml($config_theme) ?>" data-lte-primary="<?= escapeHtml($config_theme) ?>">
|
<body class="layout-fixed bg-body-tertiary theme-<?= escapeHtml($config_theme) ?>" data-lte-primary="<?= escapeHtml($config_theme) ?>">
|
||||||
<div class="app-wrapper text-sm">
|
<div class="app-wrapper text-sm">
|
||||||
@@ -64,7 +64,12 @@ header("X-Frame-Options: DENY");
|
|||||||
attribute rather than an inline <script> so it does not add to the
|
attribute rather than an inline <script> so it does not add to the
|
||||||
CSP unsafe-inline debt. Empty when the company has no country set,
|
CSP unsafe-inline debt. Empty when the company has no country set,
|
||||||
which js/app.js reads as "let the library decide". */ ?>
|
which js/app.js reads as "let the library decide". */ ?>
|
||||||
<body class="layout-fixed sidebar-expand-lg app-loaded theme-<?= escapeHtml($config_theme) ?>" data-lte-primary="<?= escapeHtml($config_theme) ?>"
|
<?php /* bg-body-tertiary is what tints the page behind the cards. AdminLTE 3 painted
|
||||||
|
it on .content-wrapper; v4's .app-main has no background at all and the tint
|
||||||
|
moved to this body utility, so the migration dropped it silently. It matters
|
||||||
|
because --bs-card-bg is --bs-body-bg - without it every card is the exact
|
||||||
|
colour of the page and only its border separates the two. */ ?>
|
||||||
|
<body class="layout-fixed sidebar-expand-lg app-loaded bg-body-tertiary theme-<?= escapeHtml($config_theme) ?>" data-lte-primary="<?= escapeHtml($config_theme) ?>"
|
||||||
data-itflow-phone-country="<?= escapeHtml($country_iso2_array[$session_company_country] ?? '') ?>">
|
data-itflow-phone-country="<?= escapeHtml($country_iso2_array[$session_company_country] ?? '') ?>">
|
||||||
<div class="app-wrapper text-sm">
|
<div class="app-wrapper text-sm">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user