mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
update toaster template class and fix toast timeout
This commit is contained in:
@@ -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();
|
||||
})
|
||||
|
||||
@@ -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}
|
||||
<div class="toaster" id="pwg_toaster">
|
||||
<div class="toast template" id="toast_template">
|
||||
<div class="toast template-pwg-toaster" id="toast_template">
|
||||
<i class="toast_icon"></i>
|
||||
<p class="toast_text"></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user