const Toast = { fire: function (message, type) { $('body').addClass('swal2-shown swal2-toast-shown'); if ($('body').find('.swal2-container').length < 1) { $('body').append('
'); } let alert_icon = ``; switch (type) { case "error": alert_icon = ``; break; case "info": alert_icon = ``; case "warning": alert_icon = ``; break; } $.notify({ message: message, }, { element: '.swal2-container', position: null, allow_dismiss: false, newest_on_top: true, showProgressbar: true, delay: 3000, animate: { enter: 'animated fadeInRight', exit: 'animated fadeOutRight' }, onClosed: function () { $('body').removeClass('swal2-shown swal2-toast-shown'); $('body .swal2-container').remove(); }, icon_type: 'class', template: `` }); } }