using bootstrap notify for notifications

This commit is contained in:
azivner
2017-11-26 12:56:07 -05:00
parent 3e6acb17cc
commit 3a30aba42b
4 changed files with 29 additions and 27 deletions

View File

@@ -1,23 +1,29 @@
"use strict";
function showMessage(str) {
console.log("message: ", str);
function showMessage(message) {
console.log("message: ", message);
const top = $("#top-message");
top.fadeIn(1500).css("display","inline-block");
top.html(str);
top.fadeOut(1500);
$.notify({
// options
message: message
},{
// settings
type: 'success',
delay: 1500
});
}
function showError(str) {
console.log("error: ", str);
function showError(message) {
console.log("error: ", message);
const error = $("#error-message");
error.show().css("display","inline-block");
error.html(str);
error.fadeOut(10000);
$.notify({
// options
message: message
},{
// settings
type: 'danger',
delay: 10000
});
}
function getDateFromTS(timestamp) {