Improved GrapeJS toastr notifications
This commit is contained in:
parent
c7427596b1
commit
87723d05ee
1 changed files with 7 additions and 1 deletions
|
@ -19,6 +19,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#toast-container {
|
#toast-container {
|
||||||
|
top: auto !important;
|
||||||
|
bottom: 5px;
|
||||||
|
right: 325px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
}
|
}
|
||||||
|
@ -245,10 +248,12 @@
|
||||||
statusFormElC.style.opacity = '0';
|
statusFormElC.style.opacity = '0';
|
||||||
statusFormEl.removeAttribute('data-tooltip');
|
statusFormEl.removeAttribute('data-tooltip');
|
||||||
md.close();
|
md.close();
|
||||||
|
toastr.success('Testmail sent');
|
||||||
} else if (res.errors) {
|
} else if (res.errors) {
|
||||||
statusFormEl.className = 'fa fa-exclamation-circle';
|
statusFormEl.className = 'fa fa-exclamation-circle';
|
||||||
statusFormEl.setAttribute('data-tooltip', res.errors);
|
statusFormEl.setAttribute('data-tooltip', res.errors);
|
||||||
statusFormElC.className = 'form-status text-danger';
|
statusFormElC.className = 'form-status text-danger';
|
||||||
|
toastr.error(res.errors);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -357,9 +362,10 @@
|
||||||
}, null, 'html')
|
}, null, 'html')
|
||||||
.success(function() {
|
.success(function() {
|
||||||
window.bridge.lastSavedHtml = html;
|
window.bridge.lastSavedHtml = html;
|
||||||
|
toastr.success('Sucessfully saved');
|
||||||
})
|
})
|
||||||
.fail(function(data) {
|
.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() {
|
.always(function() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue