You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
870 B
JavaScript
35 lines
870 B
JavaScript
$(function () {
|
|
var displayMessage = function (message, msgType) {
|
|
toastr.options = {
|
|
"closeButton": true,
|
|
"debug": false,
|
|
"newestOnTop": false,
|
|
"progressBar": true,
|
|
"positionClass": "toast-top-right",
|
|
"preventDuplicates": false,
|
|
"onclick": null,
|
|
"showDuration": "300",
|
|
"hideDuration": "1000",
|
|
"timeOut": "5000",
|
|
"extendedTimeOut": "1000",
|
|
"showEasing": "swing",
|
|
"hideEasing": "linear",
|
|
"showMethod": "fadeIn",
|
|
"hideMethod": "fadeOut"
|
|
};
|
|
toastr[msgType](message);
|
|
};
|
|
|
|
if ($('#success').val()) {
|
|
displayMessage($('#success').val(), 'success');
|
|
}
|
|
if ($('#info').val()) {
|
|
displayMessage($('#info').val(), 'info');
|
|
}
|
|
if ($('#warning').val()) {
|
|
displayMessage($('#warning').val(), 'warning');
|
|
}
|
|
if ($('#error').val()) {
|
|
displayMessage($('#error').val(), 'error');
|
|
}
|
|
}); |