[GIT] Evergreen ILS branch main updated. 6f076e7192aae7496ed9394ac95c529ad8b71602

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, main has been updated via 6f076e7192aae7496ed9394ac95c529ad8b71602 (commit) from d6f4414afb5237cddc3f659b2ae633c1f688851b (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 6f076e7192aae7496ed9394ac95c529ad8b71602 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 341340724b..97649031e5 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