Extend lt.time.ago() to ticket view, replace showToast with lt.toast

- Add data-ts attributes to TicketView.php: ticket created/updated
  header, comment dates (inner span to preserve edited indicator),
  and all activity timeline dates
- Add initRelativeTimes() to ticket.js using lt.time.ago(); runs on
  DOMContentLoaded and every 60s to keep relative times current
- Attachment dates now use lt.time.ago() with full date in title attr
  and ts-cell span for periodic refresh
- Replace all 11 showToast() calls in ticket.js with lt.toast.* directly,
  removing reliance on the backwards-compat shim for these paths
- Add span.ts-cell and td.ts-cell CSS to both dashboard.css and ticket.css:
  dotted underline + cursor:help signals the title tooltip is available

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 11:03:34 -04:00
parent 3c3b9d0a61
commit d44a530018
4 changed files with 56 additions and 17 deletions

View File

@@ -4642,6 +4642,20 @@ table td:nth-child(4) {
border-top: 1px solid var(--terminal-green);
}
/* ===== RELATIVE TIMESTAMP CELLS ===== */
/* Inline spans with data-ts show relative time; title attr has the full date */
span.ts-cell {
cursor: help;
border-bottom: 1px dotted var(--text-muted);
text-decoration: none;
}
/* Table cells with data-ts — no underline on full td, just cursor hint */
td.ts-cell {
cursor: help;
}
/* ===== ENHANCED MOBILE RESPONSIVE STYLES ===== */
/* Table wrapper - horizontal scroll when table overflows container */

View File

@@ -1489,6 +1489,14 @@ body.dark-mode .editable {
border-color: var(--border-color) !important;
}
/* ===== RELATIVE TIMESTAMP CELLS ===== */
span.ts-cell {
cursor: help;
border-bottom: 1px dotted var(--text-muted);
text-decoration: none;
}
/* ===== RESPONSIVE DESIGN - TERMINAL EDITION ===== */
/* Tablet and smaller */