[GIT] Evergreen ILS branch rel_3_15 updated. 78c87a47c4a4c0c3aa359dbd115d02dd035aa668

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, rel_3_15 has been updated via 78c87a47c4a4c0c3aa359dbd115d02dd035aa668 (commit) from 39e44b53bcdd0f842a2c13bd9e465f4dcad8a488 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 78c87a47c4a4c0c3aa359dbd115d02dd035aa668 Author: Stephanie Leary <stephanie.leary@equinoxoli.org> Date: Fri Apr 11 15:10:45 2025 +0000 LP2107116 Restore toast dismiss function Restores the dismiss() function in the toast component, which allows users to close specific toasts before they expire by clicking the close ('X') button. This was accidentally removed in bug 2103619, which added support for multiple toast messages. Release-note: Restores ability to dismiss toasts by clicking 'X' button Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: blake <blake@mobiusconsortium.org> diff --git a/Open-ILS/src/eg2/src/app/share/toast/toast.component.html b/Open-ILS/src/eg2/src/app/share/toast/toast.component.html index 221bcc98e9..6a2e91395d 100644 --- a/Open-ILS/src/eg2/src/app/share/toast/toast.component.html +++ b/Open-ILS/src/eg2/src/app/share/toast/toast.component.html @@ -1,8 +1,10 @@ <output id="eg-toast-container" role="status"> <ul *ngIf="messages.length" class="list-unstyled"> - <li *ngFor="let message of messages" class="alert alert-{{message.style}} alert-dismissible border-2 fade shadow-lg show"> - {{message.text}} - <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close alert" (click)="dismiss()"></button> - </li> + <ng-container *ngFor="let message of messages; index as i"> + <li *ngIf="message && message.text" class="alert alert-{{message.style}} alert-dismissible border-2 fade shadow-lg show"> + {{message.text}} + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close alert" (click)="dismiss(i)"></button> + </li> + </ng-container> </ul> </output> diff --git a/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts b/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts index 8e01cd0b42..5d45cc325f 100644 --- a/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts +++ b/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts @@ -42,6 +42,11 @@ export class ToastComponent implements OnInit { this.duration ); } + + // delete a specific toast when user clicks the 'x' button + dismiss(index: number) { + this.messages[index] = null; + } } ----------------------------------------------------------------------- Summary of changes: Open-ILS/src/eg2/src/app/share/toast/toast.component.html | 10 ++++++---- Open-ILS/src/eg2/src/app/share/toast/toast.component.ts | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User