From f386533d5fd560281e6c36153e0431e6135a3620 Mon Sep 17 00:00:00 2001 From: pimka <pimka@ro.ru> Date: Fri, 26 Dec 2014 13:09:19 +0300 Subject: [PATCH] modal window --- ~dev_rating/application/views/base.twig | 4 ++-- ~dev_rating/media/css/base.css | 31 +++++++++++++++++++++++++ ~dev_rating/media/js/profile.js | 24 ++++++++++++++++--- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/~dev_rating/application/views/base.twig b/~dev_rating/application/views/base.twig index fc75c530f..227a5571e 100644 --- a/~dev_rating/application/views/base.twig +++ b/~dev_rating/application/views/base.twig @@ -132,10 +132,10 @@ <div class='auth_error'>Неправильный логин/E-Mail или пароль</div> <div class='inputs'> <div class="auth_form"> - <input type="text" id="login" name="login" placeholder="Логин или E-Mail"> + <input type="text" id="login" name="login" placeholder="Логин или E-Mail" value=""> </div> <div class="auth_form"> - <input type="text" id="password" name="password" placeholder="Пароль"> + <input type="password" id="password" name="password" placeholder="Пароль" value=""> </div> </div> diff --git a/~dev_rating/media/css/base.css b/~dev_rating/media/css/base.css index 3f1ae32ab..a4d6eddab 100644 --- a/~dev_rating/media/css/base.css +++ b/~dev_rating/media/css/base.css @@ -357,6 +357,9 @@ h2.BlueTitle{ height: 100%; background: rgba(0,0,0,.7); text-align: center; + + + } .popup_overlay:after { @@ -382,6 +385,8 @@ h2.BlueTitle{ .auth_error { display: none; + font-size: 9pt; + color: red; } .inputs { @@ -393,5 +398,31 @@ h2.BlueTitle{ margin-top: 5px; } +.popup_overlay:target > div { +-webkit-animation-name: bounce; +} + + +@-webkit-keyframes bounce { + 0% { + -webkit-transform: scale3d(0.1,0.1,1); + -webkit-box-shadow: 0 3px 20px rgba(0,0,0,0.9); + } + 55% { + -webkit-transform: scale3d(1.08,1.08,1); + -webkit-box-shadow: 0 10px 20px rgba(0,0,0,0); + } + 75% { + -webkit-transform: scale3d(0.95,0.95,1); + -webkit-box-shadow: 0 0 20px rgba(0,0,0,0.9); + } + 100% { + -webkit-transform: scale3d(1,1,1); + -webkit-box-shadow: 0 3px 20px rgba(0,0,0,0.9); + } +} + + + /*----------------------------------------------------*/ diff --git a/~dev_rating/media/js/profile.js b/~dev_rating/media/js/profile.js index 21f97b82e..a950d8224 100644 --- a/~dev_rating/media/js/profile.js +++ b/~dev_rating/media/js/profile.js @@ -34,14 +34,32 @@ $(function() function closeSession() { - - - $.ajax({ type: "POST", url: URLdir + "handler/Session/closeSession", success: function(data) { + $('.popup_overlay').css('display', 'block'); + + $('#signin_b').click(function() + { + + $.post(URLdir + 'handler/sign/in', {'login': $('#login').val(), 'password': $.sha1($('#password').val())}, + function(data) + { + data = $.parseJSON(data); + if(data.success === true) + { + $('.popup_overlay').css('display', 'none'); + setSessionTimer(1); + } + else + { + $('.auth_error').show(); + } + }); + + }); } }); } -- GitLab