Added exclamation icon to alertify warning messages.

This commit is contained in:
Akshay Joshi 2020-09-02 17:27:26 +05:30
parent 1c9badec9c
commit ddf5b33219

View File

@ -424,7 +424,8 @@ define([
};
var alertifySuccess = alertify.success,
alertifyError = alertify.error;
alertifyError = alertify.error,
alertifyWarning = alertify.warning;
/*
For adding the jasmine test cases, we needed to refer the original success,
@ -433,6 +434,7 @@ define([
_.extend(alertify, {
orig_success: alertifySuccess,
orig_error: alertifyError,
orig_warning: alertifyWarning,
});
_.extend(alertify, {
@ -467,6 +469,17 @@ define([
var alert = alertify.notify(alertMessage, timeout);
return alert;
},
warning: function(message, timeout) {
var alertMessage =
`<div class="d-flex px-3 py-2">
<div class="mr-3">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
</div>
<div class="alert-text-body" role="status">${message}</div>
</div>`;
var alert = alertify.orig_warning(alertMessage, timeout);
return alert;
},
});
// Confirm dialogue: Set title attribute