New alert design (#9214)

* ux: updated alert design

* fixed bg-color for alerts

* more changes to alerts, index fixed
This commit is contained in:
Patrick O'Carroll
2017-09-12 08:01:44 +02:00
committed by Torkel Ödegaard
parent 057b8a6b2d
commit 90602942f5
10 changed files with 77 additions and 50 deletions

View File

@@ -33,6 +33,14 @@ export class AlertSrv {
appEvents.on('confirm-modal', this.showConfirmModal.bind(this));
}
getIconForSeverity(severity) {
switch (severity) {
case 'success': return 'fa fa-check';
case 'error': return 'fa fa-exclamation-triangle';
default: return 'fa fa-exclamation';
}
}
set(title, text, severity, timeout) {
if (_.isObject(text)) {
console.log('alert error', text);
@@ -45,6 +53,7 @@ export class AlertSrv {
title: title || '',
text: text || '',
severity: severity || 'info',
icon: this.getIconForSeverity(severity)
};
var newAlertJson = angular.toJson(newAlert);