Undo message keeps the close x apart from Undo - the x has its own strip behind a divider line and a larger target, and a click on the message itself no longer closes it, so a click that just misses Undo keeps the offer; other messages still close on any click

This commit is contained in:
johnnyq
2026-11-20 16:28:36 -05:00
parent 491f2c4d42
commit 651a4d1306
3 changed files with 27 additions and 4 deletions

View File

@@ -188,7 +188,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
- Projects: a project has a Timeline - its booked tickets as bars in time, from its start to its due date, with now marked. A booking that is past and still open shows in amber, and two of the same agent's at the same time are flagged. Its open tickets with no booking are listed under it, with Book.
- Pickers: long lists of clients, contacts, vendors, categories, locations, assets, technicians, projects, accounts and products start with the last five you picked in a field like it, under Recent, above All. Typing searches everything as before.
- Archived: Tools > Archived lists what was archived lately - clients, contacts, locations, vendors, assets, credentials, documents, files, domains, certificates, networks, racks, services, licenses, projects and products - newest first, with who archived each one, to restore one or several at once. The last 30 days to start with, or pick another time, a kind or a client.
- Undo: archiving no longer asks "Are you sure?" - the message that says it's done has Undo instead, as do moves and changes to several records at once. The message stays up for ten seconds, or as long as the pointer is on it. Undo covers archiving one or several of every kind Archived lists, bringing back what archiving took with it - a contact's roles, a document's links, a client's recurring invoices; moving files, documents and folders, dragged or with Move; dragging kit on a rack; and the bulk changes to a ticket's priority, category or project, an asset's location, physical location, contact or status, a contact's location, department, phone number or roles, a client's industry or referral, a project's manager or due date, an invoice's or product's category, and an IP address's type. Undo works once and only for whoever made the change, and leaves anything changed again since as it is, saying how many. Archiving a client still asks first, and has no Undo when it withdrew a contract out for signing.
- Undo: archiving no longer asks "Are you sure?" - the message that says it's done has Undo instead, as do moves and changes to several records at once. The message stays up for ten seconds, or as long as the pointer is on it, and only its x closes it - set apart from Undo, so a click that just misses Undo doesn't lose it. Undo covers archiving one or several of every kind Archived lists, bringing back what archiving took with it - a contact's roles, a document's links, a client's recurring invoices; moving files, documents and folders, dragged or with Move; dragging kit on a rack; and the bulk changes to a ticket's priority, category or project, an asset's location, physical location, contact or status, a contact's location, department, phone number or roles, a client's industry or referral, a project's manager or due date, an invoice's or product's category, and an IP address's type. Undo works once and only for whoever made the change, and leaves anything changed again since as it is, saying how many. Archiving a client still asks first, and has no Undo when it withdrew a contract out for signing.
- Client portal: one Search box in the top bar looks through the client's tickets - their subject, number and what was said on them - the documents you share with them and your Help articles at once, the first eight of each with See all. Nothing found offers Ask us, and a search with no Help article goes on the Knowledge Base's Not found list.
- Client portal: a ticket says when to expect your first reply - We'll reply by and the time, from its SLA - until you reply, while it isn't on hold and the time is still ahead. New ticket says how soon you reply to each priority, beside the priority and under What happens next. Without SLAs nothing is promised.
- Users: Invite several, beside New User, invites a list of people at once with one role (and office, and whether two-step sign-in is required) - one per line, as a name and email or just the email. Each gets their own invite email; anyone who already has an account is skipped and named. It needs email set up.

View File

@@ -651,6 +651,23 @@ a:focus {
animation-play-state: paused;
}
/* Undo and the x kept apart: the x in its own strip behind a line, and only
the x closes this one (the click handler in inc_alert_feedback.php), so a
click that just misses Undo doesn't lose it. The line is drawn in the x's
own black, so the white x's filter turns it white with it. */
.itflow-toast.itflow-toast-undo {
cursor: default;
}
.itflow-toast-undo .itflow-toast-close {
align-self: stretch;
height: auto;
margin: .5rem 0;
padding: 0 1rem;
border-left: 1px solid rgba(0, 0, 0, .6);
border-radius: 0;
cursor: pointer;
}
@keyframes itflow-toast-in {
from {
opacity: 0;

View File

@@ -71,13 +71,14 @@ if (!empty($_SESSION['alert_message'])) {
<i class="fas fa-fw <?= $alert_icon ?> fa-lg ms-3"></i>
<div class="toast-body"><?= $alert_safe_message ?></div>
<?php if ($alert_undo_token) { ?>
<a class="btn btn-sm <?= $alert_dark_text ? 'btn-outline-dark' : 'btn-outline-light' ?> fw-semibold text-nowrap flex-shrink-0 me-1" data-undo
<a class="btn btn-sm <?= $alert_dark_text ? 'btn-outline-dark' : 'btn-outline-light' ?> fw-semibold text-nowrap flex-shrink-0 me-3" data-undo
href="/agent/post.php?undo=<?= escapeHtml($alert_undo_token) ?>&amp;csrf_token=<?= escapeHtml($_SESSION['csrf_token']) ?>"><i class="fas fa-undo me-1"></i>Undo</a>
<?php } ?>
<?php /* No data-bs-dismiss - the click handler below covers the
whole toast, and this button sits inside it. */ ?>
whole toast, and this button sits inside it. Beside Undo
it stands apart behind a line (.itflow-toast-close). */ ?>
<button type="button"
class="btn-close <?= $alert_dark_text ? '' : 'btn-close-white' ?> me-2 m-auto"
class="btn-close <?= $alert_dark_text ? '' : 'btn-close-white' ?> <?= $alert_undo_token ? 'itflow-toast-close' : 'me-2 m-auto' ?>"
aria-label="Close"></button>
</div>
<div class="itflow-toast-progress"></div>
@@ -107,6 +108,11 @@ if (!empty($_SESSION['alert_message'])) {
undo.classList.add('disabled');
return;
}
// With Undo on it, only the x closes it - a click that just
// misses Undo keeps the offer
if (el.classList.contains('itflow-toast-undo') && !event.target.closest('.btn-close')) {
return;
}
el.remove();
});