[Notifications] #499 All notifications now dismissable by default.

jslint
This commit is contained in:
Henry
2016-02-05 17:40:04 -08:00
parent 2dd9a16bf3
commit 5292b27e7d
7 changed files with 106 additions and 34 deletions

View File

@ -104,14 +104,16 @@ define(
* persistence.
*/
function notifyOnError(error, domainObject, notificationService, $q){
var errorMessage = "Unable to persist " + domainObject.getModel().name;
var errorMessage = "Unable to persist " + domainObject.getModel().name,
notification;
if (error) {
errorMessage += ": " + formatError(error);
}
notificationService.error({
notification = notificationService.error({
title: "Error persisting " + domainObject.getModel().name,
hint: errorMessage || "Unknown error"
hint: errorMessage || "Unknown error",
dismissable: true
});
return $q.reject(error);