From 6fdbe72fbb100750472c54d4223b46787220a22d Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 18 Sep 2025 14:17:51 +0300 Subject: [PATCH] Fixed toastr problem --- .../create-or-edit-event-area.js | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/create-or-edit-event-area.js b/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/create-or-edit-event-area.js index 4626692..211a463 100644 --- a/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/create-or-edit-event-area.js +++ b/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/create-or-edit-event-area.js @@ -1,8 +1,11 @@ (function () { abp.widgets.CreateOrEditEventArea = function ($wrapper) { var l = abp.localization.getResource('EventHub'); - toastr.options.timeOut = 500; - toastr.options.preventDuplicates = true; + + AbpToastService.setDefaultOptions({ + life: 5000, + closable: true + }); var stepType = { "Event": "Event", @@ -74,16 +77,18 @@ if (eventIdInput.val().length === 36) { abp.notify.success('Updated event'); }else{ - abp.notify.success('Created event as a draft' , '', toastr.options.timeOut = 2500); + abp.notify.success('Created event as a draft' , '', { + life: 2500 + }); eventIdInput.val(response.id); eventUrlCodeInput.val(response.urlCode); } SwitchToTrackCreation() }, error: function (errorRaw) { - abp.notify.error(errorRaw.responseJSON.error.message, 'Error', - toastr.options = { - timeOut: 2500, + abp.notify.error(errorRaw.responseJSON.error.message, 'Error', + { + life: 2500, progressBar: true, positionClass: "toast-bottom-right" } @@ -385,8 +390,8 @@ abp.notify.error( error.message, 'Error', - toastr.options = { - timeOut: 2500, + { + life: 2500, progressBar: true, positionClass: "toast-bottom-right" }