abp.toastr.js 919 B

1234567891011121314151617181920212223242526272829303132
  1. var abp = abp || {};
  2. (function () {
  3. if (!toastr) {
  4. return;
  5. }
  6. /* DEFAULTS *************************************************/
  7. toastr.options.positionClass = 'toast-bottom-right';
  8. /* NOTIFICATION *********************************************/
  9. var showNotification = function (type, message, title, options) {
  10. toastr[type](message, title, options);
  11. };
  12. abp.notify.success = function (message, title, options) {
  13. showNotification('success', message, title, options);
  14. };
  15. abp.notify.info = function (message, title, options) {
  16. showNotification('info', message, title, options);
  17. };
  18. abp.notify.warn = function (message, title, options) {
  19. showNotification('warning', message, title, options);
  20. };
  21. abp.notify.error = function (message, title, options) {
  22. showNotification('error', message, title, options);
  23. };
  24. })();