mirror of https://github.com/abpframework/abp.git
5 changed files with 40 additions and 9 deletions
@ -0,0 +1,34 @@ |
|||||
|
var abp = abp || {}; |
||||
|
(function () { |
||||
|
|
||||
|
if (!toastr) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
/* DEFAULTS *************************************************/ |
||||
|
|
||||
|
toastr.options.positionClass = 'toast-bottom-right'; |
||||
|
|
||||
|
/* NOTIFICATION *********************************************/ |
||||
|
|
||||
|
var showNotification = function (type, message, title, options) { |
||||
|
toastr[type](message, title, options); |
||||
|
}; |
||||
|
|
||||
|
abp.notify.success = function (message, title, options) { |
||||
|
showNotification('success', message, title, options); |
||||
|
}; |
||||
|
|
||||
|
abp.notify.info = function (message, title, options) { |
||||
|
showNotification('info', message, title, options); |
||||
|
}; |
||||
|
|
||||
|
abp.notify.warn = function (message, title, options) { |
||||
|
showNotification('warning', message, title, options); |
||||
|
}; |
||||
|
|
||||
|
abp.notify.error = function (message, title, options) { |
||||
|
showNotification('error', message, title, options); |
||||
|
}; |
||||
|
|
||||
|
})(); |
||||
Loading…
Reference in new issue