From 87723d05ee4b16b1404e358653866fb382a333a4 Mon Sep 17 00:00:00 2001 From: witzig Date: Fri, 10 Mar 2017 17:11:49 +0100 Subject: [PATCH] Improved GrapeJS toastr notifications --- views/grapejs/editor.hbs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/views/grapejs/editor.hbs b/views/grapejs/editor.hbs index 2b0c6916..f6203b1a 100644 --- a/views/grapejs/editor.hbs +++ b/views/grapejs/editor.hbs @@ -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() {