Improved GrapeJS toastr notifications

This commit is contained in:
witzig 2017-03-10 17:11:49 +01:00
parent c7427596b1
commit 87723d05ee

View file

@ -19,6 +19,9 @@
}
#toast-container {
top: auto !important;
bottom: 5px;
right: 325px;
font-size: 13px;
font-weight: lighter;
}
@ -245,10 +248,12 @@
statusFormElC.style.opacity = '0';
statusFormEl.removeAttribute('data-tooltip');
md.close();
toastr.success('Testmail sent');
} else if (res.errors) {
statusFormEl.className = 'fa fa-exclamation-circle';
statusFormEl.setAttribute('data-tooltip', res.errors);
statusFormElC.className = 'form-status text-danger';
toastr.error(res.errors);
}
});
@ -357,9 +362,10 @@
}, null, 'html')
.success(function() {
window.bridge.lastSavedHtml = html;
toastr.success('Sucessfully saved');
})
.fail(function(data) {
alert(data.responseText || 'An error occured while saving the document');
toastr.error(data.responseText || 'An error occured while saving the document');
})
.always(function() {
setTimeout(function() {