32# added SweetAlert2 to wishlist

This commit is contained in:
Eligiusz Kurzawa 2021-01-16 19:37:06 +01:00
parent 2bb04341d3
commit 21e9f74911

View File

@ -486,7 +486,22 @@
method:"GET", method:"GET",
success:function () { success:function () {
$('#jobwl' + id).removeClass('btn-primary').addClass('btn-danger') $('#jobwl' + id).removeClass('btn-primary').addClass('btn-danger')
alert("Success") const Toast = Swal.mixin({
toast: true,
position: 'top',
showConfirmButton: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'success',
title: 'Added'
})
} }
}); });
} }
@ -499,7 +514,22 @@
method:"GET", method:"GET",
success:function () { success:function () {
$('#jobwl' + id).removeClass('btn-danger').addClass('btn-primary') $('#jobwl' + id).removeClass('btn-danger').addClass('btn-primary')
alert("Success") const Toast = Swal.mixin({
toast: true,
position: 'top',
showConfirmButton: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: 'Removed'
})
} }
}); });
} }