diff --git a/~dev_rating/application/views/base.twig b/~dev_rating/application/views/base.twig index 224775bdb30862dcfb0c963f581de39b6f91e655..fc75c530f5ad0d386a772077f8ebc019511cee68 100644 --- a/~dev_rating/application/views/base.twig +++ b/~dev_rating/application/views/base.twig @@ -124,5 +124,31 @@ </div> </div> + +<div class="popup_overlay"> + <div class="popup"> + <form action="sign" method='POST' id='signin_f'> + <div class="session_info">Пожалуйста, авторизируйтесь заново</div> + <div class='auth_error'>Неправильный логин/E-Mail или пароль</div> + <div class='inputs'> + <div class="auth_form"> + <input type="text" id="login" name="login" placeholder="Логин или E-Mail"> + </div> + <div class="auth_form"> + <input type="text" id="password" name="password" placeholder="Пароль"> + </div> + </div> + + <!-- {{ sign.input('signin_b', 'button', 'Войти') }} --> + <div class="auth_form"> + <input type="button" id="signin_b" name="button" value="Войти"> + </div> + </form> + <div class='actiongrid'> + {# {{ HTML.anchor('remind', 'Забыли пароль?')|raw }} | #} + {{ HTML.anchor('sign/up', 'Активировать аккаунт')|raw }} | {{ HTML.anchor('remind', 'Забыли пароль?')|raw }} + </div> + </div> +</div> </body> </html> \ No newline at end of file diff --git a/~dev_rating/media/css/base.css b/~dev_rating/media/css/base.css index 8133da5928333fa1691e1300a38e269926d31fb6..3f1ae32ab75b0904d80e2c47ba1745589ace8480 100644 --- a/~dev_rating/media/css/base.css +++ b/~dev_rating/media/css/base.css @@ -299,8 +299,99 @@ h2.BlueTitle{ +/*---------------- модальное окно -------------------*/ +.session_info { + font: 9pt; + color: #aaaaaa; +} + +.auth_form +{ + padding: 3px; + margin: 0 auto; + text-align: center; +} + +.auth_form input +{ + margin: 0 auto; + margin: 1px 0; + border: 1px solid; + border-radius: 3px; +} + +.auth_form input[type=text], .auth_form input[type=password] +{ + font-size: 9pt; + width: 90%; + border-color: #aaaaaa; + overflow: hidden; + padding: 7px; +} + +.auth_form input[type=button], .auth_form input[type=submit] +{ + margin: 0 auto; + width: 95%; + overflow: hidden; + padding: 7px; + background-color: #009933; + border: none; + color: #ffffff; +} +.auth_form input[type=button]:hover, .auth_form input[type=submit]:hover +{ + cursor: pointer; + background-color: #009000; +} + + +.popup_overlay { + z-index: 9999; + display: none; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,.7); + text-align: center; +} + +.popup_overlay:after { + display: inline-block; + height: 100%; + width: 0; + vertical-align: middle; + content: ''; +} +.popup { + display: inline-block; + position: relative; + max-width: 300px; + padding: 20px; + border: 3px solid #fff; + border-radius: 10px; + box-shadow: inset 0 1px 2px 1px rgba(0,0,0,.4); + background: #fff; + vertical-align: middle +} + + +.auth_error { + display: none; +} +.inputs { + margin: 0 auto; + margin-top: 5px; +} + +.actiongrid { + margin-top: 5px; +} +/*----------------------------------------------------*/ diff --git a/~dev_rating/media/js/profile.js b/~dev_rating/media/js/profile.js index 1b9bdbda82439c7ac3f48458f900f666a4dd49c3..21f97b82e2993e5d1de03e8d0ddedaf8d5b299b6 100644 --- a/~dev_rating/media/js/profile.js +++ b/~dev_rating/media/js/profile.js @@ -34,10 +34,15 @@ $(function() function closeSession() { + + + $.ajax({ type: "POST", url: URLdir + "handler/Session/closeSession", - success: function(data) {window.location.replace(URLdir);} + success: function(data) { + $('.popup_overlay').css('display', 'block'); + } }); } @@ -52,7 +57,7 @@ $(function() data = $.parseJSON(data); wait = parseInt(data, 10); if (wait <= 10) { - closeSession(wait); + closeSession(); return; } else { setSessionTimer(wait-10); @@ -63,33 +68,5 @@ $(function() } setSessionTimer(1); - - - - - // $(document).bind('mousemove keydown scroll', function(){ - // clearTimeout(timer); // отменяем прежний временной отрезок - - // timer = setTimeout(function(){ - // // Действия на отсутствие пользователя - // $.ajax({ - // type: "POST", - // url: URLdir + "handler/Sign2/getSessionTime", - // success: function(data) - // { - // data = $.parseJSON(data); - // wait2 = data.duration; - // } - // }); - - - // if (wait < 10) { - // alert("Простите, но Вы были неактивны более " + wait/(60 * 1000) + " минут. \n\ - // Если Вы хотите продолжить работу, снова войдите в систему на странице авторизации."); - // document.location.href = URLdir + "/sign/out"; - // } - // }, wait); - // }); - - //$("body").trigger("mousemove"); // сгенерируем ложное событие, для запуска скрипта + }); \ No newline at end of file