From c4d4ac2bfe8c46531cdc22a45a3dcaede9325f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Sun, 2 Oct 2016 14:46:54 +0200 Subject: [PATCH] FEATURE: add notification after sending mail from contact form --- .../Resources/assets/css/grayscale.css | 19 +++++++++++++++++++ .../Resources/assets/js/grayscale.js | 12 ++++++++++++ .../contactform/visitor/default.blade.php | 7 +++++++ .../Resources/views/visitor/layout.blade.php | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/templates/DoucovaniNeratovice/Resources/assets/css/grayscale.css b/templates/DoucovaniNeratovice/Resources/assets/css/grayscale.css index c2086648..e5487dd7 100644 --- a/templates/DoucovaniNeratovice/Resources/assets/css/grayscale.css +++ b/templates/DoucovaniNeratovice/Resources/assets/css/grayscale.css @@ -329,4 +329,23 @@ footer p { #nabizene-doucovani { background-color: #C4C0A9; +} + +.notification { + position: fixed; + z-index: 9999; + top: 5em; + right: 12.5%; + width: 75%; + + text-align: center; + line-height: 3em; + font-size: 2em; + opacity: .9; + box-shadow: silver 0 0 5px; +} + +.notification.success { + background: #308424; + color: white; } \ No newline at end of file diff --git a/templates/DoucovaniNeratovice/Resources/assets/js/grayscale.js b/templates/DoucovaniNeratovice/Resources/assets/js/grayscale.js index ce02b762..9dfb9552 100644 --- a/templates/DoucovaniNeratovice/Resources/assets/js/grayscale.js +++ b/templates/DoucovaniNeratovice/Resources/assets/js/grayscale.js @@ -25,6 +25,18 @@ $(function() { }, 1000, 'easeInOutExpo'); event.preventDefault(); }); + + var notification = $ ('.notification'); + if (notification.length) { + + notification.click (function () { + $ (this).fadeOut ('fast'); + }); + + setTimeout (function () { + notification.fadeOut (1500) + }, 5 * 1000) + } }); // Closes the Responsive Menu on Menu Item Click diff --git a/templates/DoucovaniNeratovice/Resources/views/modules/contactform/visitor/default.blade.php b/templates/DoucovaniNeratovice/Resources/views/modules/contactform/visitor/default.blade.php index 54ac6380..b38950f2 100644 --- a/templates/DoucovaniNeratovice/Resources/views/modules/contactform/visitor/default.blade.php +++ b/templates/DoucovaniNeratovice/Resources/views/modules/contactform/visitor/default.blade.php @@ -1,3 +1,10 @@ + +@if(session('success')) +
+ Děkuji za zprávu, ozvu se na uvedený e-mail hned jak to bude možné! +
+@endif +

{{$page->title}}

diff --git a/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php b/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php index 87009b98..3a17df0c 100644 --- a/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php +++ b/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php @@ -66,7 +66,7 @@