diff --git a/platform/commonUI/notification/src/NotificationService.js b/platform/commonUI/notification/src/NotificationService.js index 8d9a62a3f7..3066b653b1 100644 --- a/platform/commonUI/notification/src/NotificationService.js +++ b/platform/commonUI/notification/src/NotificationService.js @@ -222,8 +222,8 @@ define( * @returns {Notification} the provided notification decorated with * functions to dismiss or minimize */ - NotificationService.prototype.info = function (notification) { - var notificationModel = typeof model === "string" ? {title: model} : model + NotificationService.prototype.info = function (message) { + var notificationModel = typeof message === "string" ? {title: message} : message notificationModel.autoDismiss = notificationModel.autoDismiss || true; notificationModel.severity = "info"; return this.notify(notificationModel); @@ -239,8 +239,8 @@ define( * @returns {Notification} the provided notification decorated with * functions to dismiss or minimize */ - NotificationService.prototype.alert = function (model) { - var notificationModel = typeof model === "string" ? {title: model} : model + NotificationService.prototype.alert = function (message) { + var notificationModel = typeof message === "string" ? {title: message} : message notificationModel.severity = "alert"; return this.notify(notificationModel); }; @@ -255,8 +255,8 @@ define( * @returns {Notification} the provided notification decorated with * functions to dismiss or minimize */ - NotificationService.prototype.error = function (model) { - var notificationModel = typeof model === "string" ? {title: model} : model + NotificationService.prototype.error = function (message) { + var notificationModel = typeof message === "string" ? {title: message} : message notificationModel.severity = "error"; return this.notify(notificationModel); };