diff --git a/themes/standard_pages/js/toaster.js b/themes/standard_pages/js/toaster.js index 1d1396a54..af6656cfe 100644 --- a/themes/standard_pages/js/toaster.js +++ b/themes/standard_pages/js/toaster.js @@ -20,11 +20,11 @@ function pwgToaster(info) { template.find('.toast_icon').addClass(info.icon === 'success' ? 'icon-ok' : 'icon-cancel'); template.addClass(info.icon === 'success' ? info.icon : 'error'); - template.removeClass('template'); + template.removeClass('template-pwg-toaster'); template.appendTo('#pwg_toaster'); const time = info.time ?? 3600; - setInterval(() => { + setTimeout(() => { template.fadeOut(() => { template.remove(); }) diff --git a/themes/standard_pages/template/toaster.tpl b/themes/standard_pages/template/toaster.tpl index a7e731192..7a2fd37a1 100644 --- a/themes/standard_pages/template/toaster.tpl +++ b/themes/standard_pages/template/toaster.tpl @@ -1,6 +1,6 @@ {combine_script id='toaster_js' load='async' require='jquery' path='themes/standard_pages/js/toaster.js'} {html_style} -.toast.template { +.toast.template-pwg-toaster { display: none; } @@ -52,7 +52,7 @@ } {/html_style}