mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-11-17 21:50:37 -05:00
- Appointment view: show the day of the week on the start and end dates, and lay the header out as a flex row so it no longer wraps under the action links - Calendar: month total of estimated hours and appointments in the toolbar, counting only the shown month's days (hidden past weeks included) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
621 lines
15 KiB
CSS
621 lines
15 KiB
CSS
/* Table & Grid Column Constraints */
|
|
table.cal {
|
|
table-layout: fixed !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
}
|
|
|
|
table.cal th,
|
|
table.cal td {
|
|
width: 14.28% !important;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Container Box Base */
|
|
.appointment-block {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: stretch;
|
|
box-sizing: border-box;
|
|
margin: 2px 0;
|
|
padding: 3px 4px 3px 0;
|
|
background: #e8f8ff;
|
|
border: 1px solid #91e2ff;
|
|
border-radius: 3px;
|
|
font-size: 0.9em;
|
|
line-height: 1.3;
|
|
overflow: visible !important;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
min-width: 0;
|
|
cursor: pointer;
|
|
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
|
}
|
|
|
|
/* Hover Cue */
|
|
.appointment-block:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
|
|
}
|
|
|
|
/* Left Indicator Bar Base */
|
|
.appointment-block .appointment-bar {
|
|
width: 5px;
|
|
background-color: #1fc0ff;
|
|
flex-shrink: 0;
|
|
margin-right: 5px;
|
|
border-radius: 2px 0 0 2px;
|
|
}
|
|
|
|
/* Card Content Area */
|
|
.appointment-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Row 1: Header (Avatar + Title) */
|
|
.appointment-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-weight: bold;
|
|
min-width: 0;
|
|
}
|
|
|
|
.appointment-avatar {
|
|
flex-shrink: 0;
|
|
width: 25px;
|
|
height: 25px;
|
|
border-radius: 3px;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.appointment-card .appointment-title {
|
|
flex-grow: 1;
|
|
white-space: normal;
|
|
overflow-wrap: anywhere;
|
|
word-break: break-word;
|
|
min-width: 0;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.appointment-link {
|
|
color: #000000;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Row 2: Meta Bar (Time + Hours) */
|
|
.appointment-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-weight: bold;
|
|
font-size: 0.85em;
|
|
color: #222222;
|
|
}
|
|
|
|
.appointment-time,
|
|
.appointment-hours{
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.appointment-days {
|
|
place-items: center;
|
|
}
|
|
|
|
/* Horizontal Dividers */
|
|
.appointment-card .appointment-divider {
|
|
border: 0;
|
|
border-top: 1px solid #91e2ff;
|
|
margin: 3px 0;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Row 3: Details */
|
|
.appointment-detail {
|
|
color: #000000;
|
|
font-size: 1em;
|
|
white-space: normal;
|
|
overflow-wrap: anywhere;
|
|
word-break: break-word;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Elevated Stack Order When Opened */
|
|
.appointment-block.open {
|
|
z-index: 1000 !important;
|
|
}
|
|
|
|
/* Redmine Tooltip Popover Base - Fixed Positioning Overriding JS Inline Coordinates */
|
|
.appointment-block .tip {
|
|
display: none !important;
|
|
position: absolute !important;
|
|
top: 100% !important;
|
|
left: 0 !important;
|
|
right: auto !important;
|
|
bottom: auto !important;
|
|
transform: none !important;
|
|
margin: 4px 0 0 0 !important;
|
|
width: 320px !important;
|
|
padding: 10px;
|
|
background: #ffffff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
white-space: normal;
|
|
z-index: 10000 !important;
|
|
cursor: default;
|
|
}
|
|
|
|
/* Tooltips in the two rightmost day columns open leftward, so they stay on screen. Each calendar row is
|
|
8 items (week number, then 7 days), so the last two days are items 8n+7 and 8n. */
|
|
ul.cal li.calbody:nth-child(8n+7) .appointment-block .tip,
|
|
ul.cal li.calbody:nth-child(8n) .appointment-block .tip {
|
|
left: auto !important;
|
|
right: 0 !important;
|
|
}
|
|
|
|
/* Display Tooltip ONLY on Click (.open class) */
|
|
.appointment-block.open .tip {
|
|
display: block !important;
|
|
}
|
|
|
|
/* Inner Tooltip Formatting */
|
|
.appointment-block .tip h3 {
|
|
margin: 0 0 4px 0;
|
|
font-size: 13px;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.appointment-block .tip .subtitle {
|
|
margin: 0 0 8px 0;
|
|
font-size: 11px;
|
|
color: #555;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.appointment-block .tip table.attributes {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 11px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.appointment-block .tip table.attributes th {
|
|
text-align: left;
|
|
padding: 3px 6px 3px 0;
|
|
color: #444;
|
|
font-weight: bold;
|
|
width: 35%;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.appointment-block .tip table.attributes td {
|
|
padding: 3px 0;
|
|
color: #111;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.appointment-block .tip table.attributes img.gravatar {
|
|
vertical-align: middle;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.appointment-block .tip hr {
|
|
border: 0;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.12);
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.appointment-block .tip .description {
|
|
max-height: 120px;
|
|
overflow-y: auto;
|
|
font-size: 11px;
|
|
color: #333;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.appointment-block .tip .buttons {
|
|
margin: 0;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Show View Header Elements */
|
|
.calendar-badge {
|
|
display: inline-block;
|
|
width: 38px;
|
|
border: 1px solid #b8c0c8;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
margin-right: 8px;
|
|
line-height: 1;
|
|
background: #fff;
|
|
}
|
|
|
|
.calendar-badge .month {
|
|
background-color: #d92626;
|
|
color: #ffffff;
|
|
font-size: 9px;
|
|
font-weight: bold;
|
|
padding: 3px 0 2px 0;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.calendar-badge .day {
|
|
color: #222222;
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
padding: 4px 0 3px 0;
|
|
}
|
|
|
|
h2 .appointment-title {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.appointment-dates {
|
|
font-size: 70%;
|
|
color: #555;
|
|
margin-left: 8px;
|
|
font-weight: normal;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* Show view header: a flex box sits beside the floated .contextual links instead of
|
|
wrapping under them; the dates get their own line below the title */
|
|
h2.appointment-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
h2.appointment-header .calendar-badge {
|
|
flex-shrink: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.appointment-heading {
|
|
min-width: 0;
|
|
}
|
|
|
|
.appointment-heading .appointment-title {
|
|
display: block;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.appointment-heading .appointment-dates {
|
|
display: block;
|
|
margin-left: 0;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.appointment-heading .appointment-date {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
Status colours: each status's colour (set in the plugin settings) arrives as --status-color
|
|
========================================================================== */
|
|
|
|
.appointment-block,
|
|
.appointment-block:hover,
|
|
.appointment-block.open {
|
|
background: color-mix(in srgb, var(--status-color, #1fc0ff) 10%, #fff) !important;
|
|
border-color: color-mix(in srgb, var(--status-color, #1fc0ff) 50%, #fff) !important;
|
|
}
|
|
.appointment-block .appointment-bar { background-color: var(--status-color, #1fc0ff) !important; }
|
|
.appointment-block .appointment-divider { border-top-color: color-mix(in srgb, var(--status-color, #1fc0ff) 30%, #fff) !important; }
|
|
.appointment-block .tip,
|
|
.appointment-block:hover .tip,
|
|
.appointment-block.open .tip {
|
|
background: color-mix(in srgb, var(--status-color, #1fc0ff) 5%, #fff) !important;
|
|
border-color: color-mix(in srgb, var(--status-color, #1fc0ff) 65%, #fff) !important;
|
|
}
|
|
|
|
/* Statuses that don't count toward the hours (e.g. Cancelled) */
|
|
.appointment-block.no-hours .appointment-title,
|
|
.appointment-block.no-hours .appointment-link {
|
|
text-decoration: line-through;
|
|
}
|
|
|
|
/* Call-outs: an employee off work, not a customer appointment */
|
|
.appointment-block.call-out,
|
|
.appointment-block.call-out:hover,
|
|
.appointment-block.call-out.open {
|
|
background: repeating-linear-gradient(-45deg, #fdeceb, #fdeceb 6px, #f8d7d4 6px, #f8d7d4 12px) !important;
|
|
border: 1px dashed #d52b1e !important;
|
|
}
|
|
.appointment-block.call-out .appointment-bar { background-color: #d52b1e !important; }
|
|
.appointment-block.call-out .appointment-divider { border-top-color: #f0b4ae !important; }
|
|
.appointment-block.call-out .tip { background: #fff !important; border-color: #d52b1e !important; }
|
|
.appointment-block.call-out .appointment-call-out-label { color: #b3261b; font-size: .9em; }
|
|
|
|
/* Table List Alignment */
|
|
table.appointments td,
|
|
table.appointments th {
|
|
vertical-align: middle !important;
|
|
}
|
|
|
|
table.appointments th.status,
|
|
table.appointments td.status {
|
|
text-align: center !important;
|
|
}
|
|
|
|
/* Quick Status Bar Container */
|
|
.appointment-quick-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin: 12px 0 16px 0;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.quick-action-label {
|
|
font-weight: bold;
|
|
color: #333;
|
|
font-size: 0.85em;
|
|
margin-right: 4px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* Shared Badge Base */
|
|
.status-badge,
|
|
.quick-status-btn {
|
|
display: inline-flex !important;
|
|
align-items: center !important;
|
|
justify-content: center !important;
|
|
padding: 4px 11px;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
line-height: 1.2 !important;
|
|
border-radius: 12px;
|
|
border: 1px solid transparent;
|
|
text-decoration: none !important;
|
|
white-space: nowrap;
|
|
box-sizing: border-box;
|
|
transition: opacity 0.15s ease, transform 0.1s ease;
|
|
}
|
|
|
|
.quick-status-btn:hover {
|
|
opacity: 0.88;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
Badges & Quick Action Buttons, in the status's colour
|
|
========================================================================== */
|
|
|
|
.status-badge,
|
|
.quick-status-btn,
|
|
.status-key-badge {
|
|
background-color: color-mix(in srgb, var(--status-color, #8d9096) 12%, #fff) !important;
|
|
border: 1px solid color-mix(in srgb, var(--status-color, #8d9096) 50%, #fff) !important;
|
|
color: color-mix(in srgb, var(--status-color, #8d9096) 65%, #000) !important;
|
|
}
|
|
|
|
.status-badge.status-call-out,
|
|
.status-key-badge.status-call-out {
|
|
background: repeating-linear-gradient(-45deg, #fdeceb, #fdeceb 4px, #f8d7d4 4px, #f8d7d4 8px) !important;
|
|
border: 1px dashed #d52b1e !important;
|
|
color: #9c1f16 !important;
|
|
}
|
|
|
|
/* Redefine grid column proportions for the calendar layout */
|
|
ul.cal {
|
|
display: grid;
|
|
grid-template-columns: max-content 0.5fr repeat(5, 1fr) 0.5fr !important;
|
|
}
|
|
|
|
/* Compress content and dim non-working weekend cells */
|
|
ul.cal li.nwday,
|
|
ul.cal li.sunday,
|
|
ul.cal li.saturday {
|
|
background-color: #f7f7f7;
|
|
padding: 2px !important;
|
|
}
|
|
|
|
/* Hide non-essential metadata on narrow weekend cells */
|
|
ul.cal li.nwday .icon-user,
|
|
ul.cal li.nwday .buttons {
|
|
display: none;
|
|
}
|
|
|
|
/* Highlight Today's Calendar Box & Number */
|
|
ul.cal li.today,
|
|
ul.cal li#today,
|
|
table.cal td.today {
|
|
outline: 2px solid #ff00bf !important;
|
|
outline-offset: -2px !important;
|
|
}
|
|
|
|
/* No-new-work weeks: the checkbox under the week number, and a red ring round the whole week.
|
|
The ring is drawn by an overlay on each cell of the row, stretched over the 1px cell borders so it
|
|
joins up, and it lets clicks through to the cell. */
|
|
.cal .week-number .no-work-week-toggle {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
margin-top: 10px;
|
|
font-size: 0.7em;
|
|
font-weight: 600;
|
|
line-height: 1.1;
|
|
color: #777;
|
|
max-width: 4.5em;
|
|
white-space: normal;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.cal .week-number .no-work-week-toggle input { margin: 0; cursor: pointer; }
|
|
.cal .week-number .no-work-week-toggle input:disabled { cursor: default; }
|
|
.cal .week-number.no-work-week .no-work-week-toggle { color: #d52b1e; }
|
|
|
|
ul.cal li.no-work-week { position: relative; }
|
|
|
|
ul.cal li.no-work-week::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: -1px;
|
|
bottom: 0;
|
|
left: -1px;
|
|
right: 0;
|
|
border-top: 3px solid #d52b1e;
|
|
border-bottom: 3px solid #d52b1e;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
ul.cal li.week-number.no-work-week::after {
|
|
left: 0;
|
|
border-left: 3px solid #d52b1e;
|
|
border-radius: 14px 0 0 14px;
|
|
}
|
|
|
|
ul.cal li.no-work-week.no-work-week-last::after {
|
|
border-right: 3px solid #d52b1e;
|
|
border-radius: 0 14px 14px 0;
|
|
}
|
|
|
|
.no-work-week-override label { font-weight: bold; color: #9c1f16; }
|
|
|
|
/* Responsive Mobile View */
|
|
@media screen and (max-width: 768px) {
|
|
table.cal thead {
|
|
display: none !important;
|
|
}
|
|
|
|
table.cal,
|
|
table.cal tbody,
|
|
table.cal tr,
|
|
table.cal td {
|
|
display: block !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
table.cal td {
|
|
width: 100% !important;
|
|
min-height: 48px;
|
|
margin-bottom: 8px;
|
|
border: 1px solid #d7d7d7 !important;
|
|
border-radius: 4px;
|
|
padding: 6px !important;
|
|
background: #ffffff;
|
|
}
|
|
|
|
ul.cal {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
grid-template-columns: 1fr !important;
|
|
padding: 0 !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
ul.cal li {
|
|
width: 100% !important;
|
|
margin-bottom: 8px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Cells are stacked, so ring each one in a flagged week */
|
|
ul.cal li.no-work-week::after,
|
|
ul.cal li.week-number.no-work-week::after,
|
|
ul.cal li.no-work-week.no-work-week-last::after {
|
|
inset: 0;
|
|
border: 3px solid #d52b1e;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.appointment-block {
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
}
|
|
|
|
.appointment-block .tip,
|
|
.appointment-block.open .tip {
|
|
position: fixed !important;
|
|
top: 50% !important;
|
|
left: 50% !important;
|
|
transform: translate(-50%, -50%) !important;
|
|
width: 90vw !important;
|
|
max-width: 340px !important;
|
|
max-height: 80vh !important;
|
|
overflow-y: auto !important;
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
|
|
}
|
|
|
|
ul.cal li.calbody:nth-child(8n+7) .appointment-block .tip,
|
|
ul.cal li.calbody:nth-child(8n) .appointment-block .tip {
|
|
left: 50% !important;
|
|
right: auto !important;
|
|
}
|
|
}
|
|
|
|
/* Appointment history page */
|
|
#appointment-history-filters fieldset p label {
|
|
margin: 0 4px 0 12px;
|
|
font-weight: bold;
|
|
}
|
|
#appointment-history-filters fieldset p label:first-child {
|
|
margin-left: 0;
|
|
}
|
|
table.appointment-history td.subject {
|
|
text-align: left;
|
|
}
|
|
|
|
/* Upcoming appointments on the customer page */
|
|
.customer-appointments-simple .contextual {
|
|
margin-top: 0;
|
|
}
|
|
.customer-appointments-simple .appointment-history-link {
|
|
margin-top: 6px;
|
|
text-align: right;
|
|
}
|
|
.appointment-history-icon {
|
|
margin-left: 6px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Create issues from estimate preview */
|
|
.estimate-preview-subtitle {
|
|
font-weight: normal;
|
|
font-size: 0.8em;
|
|
color: #777;
|
|
}
|
|
table.estimate-issues-preview td.subject {
|
|
text-align: left;
|
|
}
|
|
table.estimate-issues-preview td.subject input {
|
|
width: 98%;
|
|
}
|
|
table.estimate-issues-preview tr.created td {
|
|
color: #888;
|
|
}
|
|
.estimate-issues-hint {
|
|
color: #777;
|
|
font-size: 0.9em;
|
|
}
|
|
.estimate-issue-fields .estimate-issue-fields-info {
|
|
padding-left: 0;
|
|
}
|
|
|
|
/* Calendar day: add a call-out, next to the add appointment button */
|
|
.calendar-add-call-out {
|
|
margin-left: 6px;
|
|
color: #8d9096;
|
|
font-size: 0.85em;
|
|
text-decoration: none !important;
|
|
}
|
|
.calendar-add-call-out:hover {
|
|
color: #393a3d;
|
|
}
|