59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
|
//var Toast = Swal.mixin({
|
|||
|
// toast: true,
|
|||
|
// position: 'top',
|
|||
|
// showConfirmButton: false,
|
|||
|
// timer: 3000
|
|||
|
//});
|
|||
|
|
|||
|
toastr.options = {
|
|||
|
"closeButton": false,
|
|||
|
"debug": false,
|
|||
|
"newestOnTop": true,
|
|||
|
"progressBar": false,
|
|||
|
"positionClass": "toast-top-center",
|
|||
|
"preventDuplicates": true,
|
|||
|
"onclick": null,
|
|||
|
"showDuration": 300,
|
|||
|
"hideDuration": 100,
|
|||
|
"timeOut": 3000,
|
|||
|
"extendedTimeOut": 1000,
|
|||
|
"showEasing": "swing",
|
|||
|
"hideEasing": "linear",
|
|||
|
"showMethod": "fadeIn",
|
|||
|
"hideMethod": "fadeOut"
|
|||
|
}
|
|||
|
|
|||
|
function toast_ok(text = "") {
|
|||
|
Command: toastr["success"](text)
|
|||
|
|
|||
|
//Toast.fire({
|
|||
|
// icon: 'success',
|
|||
|
// title: $text
|
|||
|
//});
|
|||
|
}
|
|||
|
|
|||
|
function toast_warning(text = "") {
|
|||
|
Command: toastr["warning"](text)
|
|||
|
//Toast.fire({
|
|||
|
// icon: 'warning',
|
|||
|
// title: text
|
|||
|
//});
|
|||
|
}
|
|||
|
|
|||
|
function toast_error(text = "") {
|
|||
|
Command: toastr["error"](text)
|
|||
|
//Toast.fire({
|
|||
|
// timer: 5000,
|
|||
|
// icon: 'error',
|
|||
|
// title: $text
|
|||
|
//});
|
|||
|
}
|
|||
|
|
|||
|
function toast(text = "", type = "success") {
|
|||
|
Command: toastr[type](text)
|
|||
|
//Toast.fire({
|
|||
|
// timer: 5000,
|
|||
|
// icon: $type,
|
|||
|
// title: $text
|
|||
|
//});
|
|||
|
}
|