Minor refactoring and renaming of variables

This commit is contained in:
Henry 2015-10-30 10:30:39 -07:00
parent 0e07fb860e
commit 86bf6c6dff

View File

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