Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

use toast class instead of flash in toast service and for showing messages after an ajax call

bsatarnejad0f662f7790dc
diff --git a/frontend/src/app/core/setup/globals/global-listeners/setup-server-response.ts b/frontend/src/app/core/setup/globals/global-listeners/setup-server-response.ts
index 5024ddd545f..abebaea75aa 100644
--- a/frontend/src/app/core/setup/globals/global-listeners/setup-server-response.ts
+++ b/frontend/src/app/core/setup/globals/global-listeners/setup-server-response.ts
@@ -140,7 +140,7 @@ function activateFlash(selector:any) {
}
function activateFlashNotice() {
- activateFlash('.flash');
+ activateFlash('.op-toast');
}
function activateFlashError() {
diff --git a/frontend/src/app/shared/components/toaster/toast.service.ts b/frontend/src/app/shared/components/toaster/toast.service.ts
index 81290b94386..618ef699dd9 100644
--- a/frontend/src/app/shared/components/toaster/toast.service.ts
+++ b/frontend/src/app/shared/components/toaster/toast.service.ts
@@ -42,7 +42,8 @@ import {
} from 'core-app/features/hal/resources/error-resource';
export function removeSuccessFlashMessages():void {
- jQuery('.flash.notice').remove();
+ debugger;
+ jQuery('.op-toast.-success').remove();
}
export type ToastType = 'success'|'error'|'warning'|'info'|'upload'|'loading';