Commit f7ab6e263d2f797df0fc00815862c9b86b3d6622
1 parent
7d22c7e7
15.04.16 seo widget
Showing
9 changed files
with
315 additions
and
22 deletions
Show diff stats
frontend/views/event/_objects.php
@@ -29,7 +29,7 @@ use yii\helpers\Url; | @@ -29,7 +29,7 @@ use yii\helpers\Url; | ||
29 | <tbody> | 29 | <tbody> |
30 | <tr> | 30 | <tr> |
31 | <td height="25"><img src="/images/ico-2.jpg" alt=""></td> | 31 | <td height="25"><img src="/images/ico-2.jpg" alt=""></td> |
32 | - <td height="25"></td><td><a data-toggle="modal" href="#registrationFormModal" style="margin-left: 11px; font-size: 13px; font-family: arial; color: #6b7b9d; border-bottom: 1px dotted;">Заказать консультацию</a></td> | 32 | + <td height="25"></td><td><a class="consultation_btn" href="#" style="margin-left: 11px; font-size: 13px; font-family: arial; color: #6b7b9d; border-bottom: 1px dotted;">Заказать консультацию</a></td> |
33 | </tr> | 33 | </tr> |
34 | </tbody> | 34 | </tbody> |
35 | </table> | 35 | </table> |
frontend/views/layouts/main.php
@@ -151,7 +151,8 @@ AppAsset::register($this); | @@ -151,7 +151,8 @@ AppAsset::register($this); | ||
151 | 151 | ||
152 | <!-- forgot password form --> | 152 | <!-- forgot password form --> |
153 | <?= $this->render('/modal/forgot_password_form_model_window') ?> | 153 | <?= $this->render('/modal/forgot_password_form_model_window') ?> |
154 | - | 154 | +<!-- consultation_modal --> |
155 | +<?= $this->render('/modal/consultation_modal') ?> | ||
155 | 156 | ||
156 | <!-- forgot password success message --> | 157 | <!-- forgot password success message --> |
157 | <div class="forgot_pass_success_wrapper"> | 158 | <div class="forgot_pass_success_wrapper"> |
frontend/views/modal/call_me.php deleted
1 | -<div class="call_me_modal_wrapper"> | ||
2 | - <!-- <form name="forgot_pass_form" id="forgot_pass_form"> --> | ||
3 | - <div class="modal_window"> | ||
4 | - <form> | ||
5 | - <div class="modal_close_btn"></div> | ||
6 | - <div class="title">Перезвонить мне</div> | ||
7 | - <label>Телефон:<input type="text" name="callme_head" id="phone_num_modal" placeholder="(0xx) xxx-xx-xx"></label> | ||
8 | - <div class="for_btn_position"><button class="my_cust_btn" type="submit">перезвонить мне</button></div> | ||
9 | - </form> | ||
10 | - </div> | ||
11 | - <!-- </form> --> | ||
12 | -</div> | ||
13 | \ No newline at end of file | 0 | \ No newline at end of file |
1 | +<?php | ||
2 | + | ||
3 | +use yii\helpers\Html; | ||
4 | + | ||
5 | +?> | ||
6 | +<div class="consultation_modal"> | ||
7 | + <div class="modal_window"> | ||
8 | + <div class="title">Заказать консультацию</div> | ||
9 | + <div class="modal_close_btn"></div> | ||
10 | + | ||
11 | + <label> Имя: <?= Html::textInput('name',"",['class'=>'consultation_name']) ?></label> | ||
12 | + | ||
13 | + <label> Номер телефона: <?= Html::textInput('phone',"",['class'=>'consultation_phone']) ?></label> | ||
14 | + | ||
15 | + <div class="for_btn_position"> | ||
16 | + <?= Html::submitButton("Заказать консультацию", ['class' => 'consultation_btn my_cust_btn', 'name' => 'login-button']) ?> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | +</div> | ||
0 | \ No newline at end of file | 20 | \ No newline at end of file |
frontend/views/service/_objects.php
@@ -26,7 +26,7 @@ use yii\helpers\Url; | @@ -26,7 +26,7 @@ use yii\helpers\Url; | ||
26 | <tbody> | 26 | <tbody> |
27 | <tr> | 27 | <tr> |
28 | <td height="25"><img src="/images/ico-2.jpg" alt=""></td> | 28 | <td height="25"><img src="/images/ico-2.jpg" alt=""></td> |
29 | - <td height="25"></td><td><a data-toggle="modal" href="#registrationFormModal" style="margin-left: 11px; font-size: 13px; font-family: arial; color: #6b7b9d; border-bottom: 1px dotted;">Заказать консультацию</a></td> | 29 | + <td height="25"></td><td><a class="consultation_btn" style="margin-left: 11px; font-size: 13px; font-family: arial; color: #6b7b9d; border-bottom: 1px dotted;">Заказать консультацию</a></td> |
30 | </tr> | 30 | </tr> |
31 | </tbody> | 31 | </tbody> |
32 | </table> | 32 | </table> |
frontend/web/css/concat_all.css
@@ -1945,6 +1945,122 @@ span.red { | @@ -1945,6 +1945,122 @@ span.red { | ||
1945 | padding: 8px 38px; | 1945 | padding: 8px 38px; |
1946 | } | 1946 | } |
1947 | 1947 | ||
1948 | +/* consultation window */ | ||
1949 | + | ||
1950 | +.consultation_modal { | ||
1951 | + color: #333333; | ||
1952 | + width: 100%; | ||
1953 | + background: rgba(0, 0, 0, 0.4); | ||
1954 | + position: absolute; | ||
1955 | + z-index: 4; | ||
1956 | + top: 0; | ||
1957 | + left: 0; | ||
1958 | + display: none; | ||
1959 | +} | ||
1960 | + | ||
1961 | +.consultation_modal .modal_window { | ||
1962 | + text-align: right; | ||
1963 | + height: 247px; | ||
1964 | + width: 459px; | ||
1965 | + background-color: #fff; | ||
1966 | + padding: 20px; | ||
1967 | + position: relative; | ||
1968 | + margin-left:auto; | ||
1969 | + margin-right:auto; | ||
1970 | + margin-top: 35px; | ||
1971 | + -webkit-border-radius: 2px; | ||
1972 | + border-radius: 2px; | ||
1973 | + overflow: hidden; | ||
1974 | + z-index:999; | ||
1975 | +} | ||
1976 | + | ||
1977 | +.consultation_modal .modal_window .title { | ||
1978 | + font-size: 18px; | ||
1979 | + font-weight: bold; | ||
1980 | + padding-top: 29px; | ||
1981 | + padding-bottom: 27px; | ||
1982 | + text-transform: uppercase; | ||
1983 | + text-align: center; | ||
1984 | +} | ||
1985 | + | ||
1986 | +.consultation_modal .modal_window input { | ||
1987 | + padding: 8px; | ||
1988 | + width: 251px; | ||
1989 | + margin-right: 56px; | ||
1990 | + margin-left: 11px; | ||
1991 | + border: 1px solid #C6C7C9; | ||
1992 | + -webkit-border-radius: 3px; | ||
1993 | + border-radius: 3px; | ||
1994 | +} | ||
1995 | + | ||
1996 | +.consultation_modal .modal_window .my_cust_btn { | ||
1997 | + font-size: 13px; | ||
1998 | + padding: 8px 31px; | ||
1999 | + color: white; | ||
2000 | + border: none; | ||
2001 | + -webkit-border-radius: 3px; | ||
2002 | + border-radius: 3px; | ||
2003 | + background-color: #6aa034; | ||
2004 | + -webkit-box-shadow: 0 2px #517a27; | ||
2005 | + box-shadow: 0 2px #517a27; | ||
2006 | +} | ||
2007 | + | ||
2008 | +.consultation_modal .modal_window .my_cust_btn:hover { | ||
2009 | + background-color: #5d8d2e; | ||
2010 | +} | ||
2011 | + | ||
2012 | +.consultation_modal .modal_window .my_cust_btn:active { | ||
2013 | + position: relative; | ||
2014 | + -webkit-box-shadow: none; | ||
2015 | + box-shadow: none; | ||
2016 | + top: 2px; | ||
2017 | +} | ||
2018 | + | ||
2019 | +.consultation_modal .modal_window .title { | ||
2020 | + padding-right: 8px; | ||
2021 | +} | ||
2022 | + | ||
2023 | +.consultation_modal .modal_window label { | ||
2024 | + display: block; | ||
2025 | + font-size: 13px; | ||
2026 | + width: 459px; | ||
2027 | + margin: auto; | ||
2028 | + margin-bottom: 8px; | ||
2029 | +} | ||
2030 | + | ||
2031 | +.consultation_modal .modal_window label input { | ||
2032 | + margin-right: 68px; | ||
2033 | +} | ||
2034 | + | ||
2035 | +.consultation_modal .modal_window .pass_links { | ||
2036 | + text-align: center; | ||
2037 | + padding-left: 55px; | ||
2038 | + font-size: 13px; | ||
2039 | + margin-top: 11px; | ||
2040 | +} | ||
2041 | + | ||
2042 | +.consultation_modal .modal_window .pass_links a { | ||
2043 | + padding-left: 47px; | ||
2044 | +} | ||
2045 | + | ||
2046 | +.consultation_modal .modal_window .pass_links label { | ||
2047 | + display: inline; | ||
2048 | +} | ||
2049 | + | ||
2050 | +.consultation_modal .modal_window .pass_links .remember_pas { | ||
2051 | + color: #6aa034; | ||
2052 | + text-decoration: underline; | ||
2053 | +} | ||
2054 | + | ||
2055 | +.consultation_modal .modal_window .for_btn_position { | ||
2056 | + text-align: center; | ||
2057 | + margin-top: 23px; | ||
2058 | +} | ||
2059 | + | ||
2060 | +.consultation_modal .modal_window .for_btn_position .my_cust_btn { | ||
2061 | + padding: 8px 38px; | ||
2062 | +} | ||
2063 | + | ||
1948 | /* forgot password window */ | 2064 | /* forgot password window */ |
1949 | 2065 | ||
1950 | .forgot_pass_modal_wrapper { | 2066 | .forgot_pass_modal_wrapper { |
@@ -3161,6 +3277,14 @@ span.red { | @@ -3161,6 +3277,14 @@ span.red { | ||
3161 | color: #D75C5C; | 3277 | color: #D75C5C; |
3162 | } | 3278 | } |
3163 | 3279 | ||
3280 | +.consultation_modal .modal_window label.error { | ||
3281 | + margin-left: 127px; | ||
3282 | + width: 265px; | ||
3283 | + text-align: left; | ||
3284 | + color: #D75C5C; | ||
3285 | +} | ||
3286 | + | ||
3287 | + | ||
3164 | .forgot_password_form label.error { | 3288 | .forgot_password_form label.error { |
3165 | margin-left: 141px; | 3289 | margin-left: 141px; |
3166 | width: 265px; | 3290 | width: 265px; |
frontend/web/css/concat_all_back.css
@@ -1934,6 +1934,122 @@ span.red { | @@ -1934,6 +1934,122 @@ span.red { | ||
1934 | padding: 8px 38px; | 1934 | padding: 8px 38px; |
1935 | } | 1935 | } |
1936 | 1936 | ||
1937 | +/* login window */ | ||
1938 | + | ||
1939 | +.consultation_modal { | ||
1940 | + color: #333333; | ||
1941 | + width: 100%; | ||
1942 | + background: rgba(0, 0, 0, 0.4); | ||
1943 | + position: absolute; | ||
1944 | + z-index: 4; | ||
1945 | + top: 0; | ||
1946 | + left: 0; | ||
1947 | + display: none; | ||
1948 | +} | ||
1949 | + | ||
1950 | +.consultation_modal .modal_window { | ||
1951 | + text-align: right; | ||
1952 | + height: 247px; | ||
1953 | + width: 459px; | ||
1954 | + background-color: #fff; | ||
1955 | + padding: 20px; | ||
1956 | + position: relative; | ||
1957 | + margin-left:auto; | ||
1958 | + margin-right:auto; | ||
1959 | + margin-top: 35px; | ||
1960 | + -webkit-border-radius: 2px; | ||
1961 | + border-radius: 2px; | ||
1962 | + overflow: hidden; | ||
1963 | + z-index:999; | ||
1964 | +} | ||
1965 | + | ||
1966 | +.consultation_modal .modal_window .title { | ||
1967 | + font-size: 18px; | ||
1968 | + font-weight: bold; | ||
1969 | + padding-top: 29px; | ||
1970 | + padding-bottom: 27px; | ||
1971 | + text-transform: uppercase; | ||
1972 | + text-align: center; | ||
1973 | +} | ||
1974 | + | ||
1975 | +.consultation_modal .modal_window input { | ||
1976 | + padding: 8px; | ||
1977 | + width: 251px; | ||
1978 | + margin-right: 56px; | ||
1979 | + margin-left: 11px; | ||
1980 | + border: 1px solid #C6C7C9; | ||
1981 | + -webkit-border-radius: 3px; | ||
1982 | + border-radius: 3px; | ||
1983 | +} | ||
1984 | + | ||
1985 | +.consultation_modal .modal_window .my_cust_btn { | ||
1986 | + font-size: 13px; | ||
1987 | + padding: 8px 31px; | ||
1988 | + color: white; | ||
1989 | + border: none; | ||
1990 | + -webkit-border-radius: 3px; | ||
1991 | + border-radius: 3px; | ||
1992 | + background-color: #6aa034; | ||
1993 | + -webkit-box-shadow: 0 2px #517a27; | ||
1994 | + box-shadow: 0 2px #517a27; | ||
1995 | +} | ||
1996 | + | ||
1997 | +.consultation_modal .modal_window .my_cust_btn:hover { | ||
1998 | + background-color: #5d8d2e; | ||
1999 | +} | ||
2000 | + | ||
2001 | +.consultation_modal .modal_window .my_cust_btn:active { | ||
2002 | + position: relative; | ||
2003 | + -webkit-box-shadow: none; | ||
2004 | + box-shadow: none; | ||
2005 | + top: 2px; | ||
2006 | +} | ||
2007 | + | ||
2008 | +.consultation_modal .modal_window .title { | ||
2009 | + padding-right: 8px; | ||
2010 | +} | ||
2011 | + | ||
2012 | +.consultation_modal .modal_window label { | ||
2013 | + display: block; | ||
2014 | + font-size: 13px; | ||
2015 | + width: 459px; | ||
2016 | + margin: auto; | ||
2017 | + margin-bottom: 8px; | ||
2018 | +} | ||
2019 | + | ||
2020 | +.consultation_modal .modal_window label input { | ||
2021 | + margin-right: 68px; | ||
2022 | +} | ||
2023 | + | ||
2024 | +.consultation_modal .modal_window .pass_links { | ||
2025 | + text-align: center; | ||
2026 | + padding-left: 55px; | ||
2027 | + font-size: 13px; | ||
2028 | + margin-top: 11px; | ||
2029 | +} | ||
2030 | + | ||
2031 | +.consultation_modal .modal_window .pass_links a { | ||
2032 | + padding-left: 47px; | ||
2033 | +} | ||
2034 | + | ||
2035 | +.consultation_modal .modal_window .pass_links label { | ||
2036 | + display: inline; | ||
2037 | +} | ||
2038 | + | ||
2039 | +.consultation_modal .modal_window .pass_links .remember_pas { | ||
2040 | + color: #6aa034; | ||
2041 | + text-decoration: underline; | ||
2042 | +} | ||
2043 | + | ||
2044 | +.consultation_modal .modal_window .for_btn_position { | ||
2045 | + text-align: center; | ||
2046 | + margin-top: 23px; | ||
2047 | +} | ||
2048 | + | ||
2049 | +.consultation_modal .modal_window .for_btn_position .my_cust_btn { | ||
2050 | + padding: 8px 38px; | ||
2051 | +} | ||
2052 | + | ||
1937 | /* forgot password window */ | 2053 | /* forgot password window */ |
1938 | 2054 | ||
1939 | .forgot_pass_modal_wrapper { | 2055 | .forgot_pass_modal_wrapper { |
@@ -2965,6 +3081,13 @@ span.red { | @@ -2965,6 +3081,13 @@ span.red { | ||
2965 | color: #D75C5C; | 3081 | color: #D75C5C; |
2966 | } | 3082 | } |
2967 | 3083 | ||
3084 | +.consultation_modal .modal_window label.error { | ||
3085 | + margin-left: 127px; | ||
3086 | + width: 265px; | ||
3087 | + text-align: left; | ||
3088 | + color: #D75C5C; | ||
3089 | +} | ||
3090 | + | ||
2968 | .forgot_password_form label.error { | 3091 | .forgot_password_form label.error { |
2969 | margin-left: 141px; | 3092 | margin-left: 141px; |
2970 | width: 265px; | 3093 | width: 265px; |
frontend/web/css/style.css
@@ -1054,6 +1054,14 @@ input.error_pass{ | @@ -1054,6 +1054,14 @@ input.error_pass{ | ||
1054 | width: 100%!important; | 1054 | width: 100%!important; |
1055 | height: 100%!important; | 1055 | height: 100%!important; |
1056 | } | 1056 | } |
1057 | + | ||
1058 | +.modal_registration_form, .modal_wrapper_login, .forgot_pass_modal_wrapper, .forgot_pass_success_wrapper, .callback_wrapper, .consultation_modal{ | ||
1059 | + display: block; | ||
1060 | + position: fixed!important; | ||
1061 | + width: 100%!important; | ||
1062 | + height: 100%!important; | ||
1063 | +} | ||
1064 | + | ||
1057 | .please_phone{ | 1065 | .please_phone{ |
1058 | position: absolute; | 1066 | position: absolute; |
1059 | border: 1px solid grey; | 1067 | border: 1px solid grey; |
frontend/web/js/my_scripts.js
@@ -139,6 +139,9 @@ $(document).ready(function(){ | @@ -139,6 +139,9 @@ $(document).ready(function(){ | ||
139 | forget_pass_again_btn = $('.forgot_pass_success_wrapper').find('.my_cust_btn'), | 139 | forget_pass_again_btn = $('.forgot_pass_success_wrapper').find('.my_cust_btn'), |
140 | log_open_btn = $('.login_button_lu'), // окно логина | 140 | log_open_btn = $('.login_button_lu'), // окно логина |
141 | reg_open_btn = $('.reg_button_lu'), // кнопка открыть | 141 | reg_open_btn = $('.reg_button_lu'), // кнопка открыть |
142 | + consultation_open_btn = $('.consultation_btn'), // кнопка консультации | ||
143 | + consultation_btn = $('.consultation_btn'), | ||
144 | + consultation_modal = $('.consultation_modal'), | ||
142 | modal_busket_open = $('.basket_add_but, .cart_btn'), // открыть модалку корзины | 145 | modal_busket_open = $('.basket_add_but, .cart_btn'), // открыть модалку корзины |
143 | modal_busket_header_open = $('i.head-down.bh_cell'), // открыть корзину в хедере | 146 | modal_busket_header_open = $('i.head-down.bh_cell'), // открыть корзину в хедере |
144 | modal_busket_header = $('.busket_modal_header'), // модальная корзина хедер | 147 | modal_busket_header = $('.busket_modal_header'), // модальная корзина хедер |
@@ -182,14 +185,44 @@ $(document).ready(function(){ | @@ -182,14 +185,44 @@ $(document).ready(function(){ | ||
182 | } | 185 | } |
183 | else{ | 186 | else{ |
184 | var num = $(".phone_me_head").find("input").val(); | 187 | var num = $(".phone_me_head").find("input").val(); |
188 | + | ||
185 | var type = 'call_me'; | 189 | var type = 'call_me'; |
186 | - send_call_me_back( num,type, function(data){ | 190 | + var data = {"num":num,"type":type}; |
191 | + send_call_me_back( data, function(data){ | ||
187 | callback_wrap.fadeIn(200); | 192 | callback_wrap.fadeIn(200); |
188 | $(".phone_me_head").find("input").val(''); | 193 | $(".phone_me_head").find("input").val(''); |
189 | }); | 194 | }); |
190 | 195 | ||
191 | } | 196 | } |
192 | }); | 197 | }); |
198 | + | ||
199 | + | ||
200 | + consultation_btn.click(function(){ // открываем окно регистрации | ||
201 | + $(".error").removeClass("error"); | ||
202 | + $(".error_pass").removeClass("error_pass"); | ||
203 | + if($(".consultation_phone").val().length == 0){ | ||
204 | + $(".consultation_phone").addClass("error"); | ||
205 | + } | ||
206 | + else{ | ||
207 | + var num = $(".consultation_phone").val(); | ||
208 | + var name = $(".consultation_name").val(); | ||
209 | + var type = 'consultation'; | ||
210 | + var data = {"num":num,"name":name,"type":type}; | ||
211 | + send_call_me_back( data, function(data){ | ||
212 | + consultation_modal.fadeIn(200); | ||
213 | + $(".consultation_phone").find("input").val(''); | ||
214 | + $(".consultation_name").find("input").val(''); | ||
215 | + }); | ||
216 | + | ||
217 | + } | ||
218 | + }); | ||
219 | + | ||
220 | + | ||
221 | + consultation_open_btn.click(function(event){ | ||
222 | + event.preventDefault(); | ||
223 | + consultation_modal.toggle(); | ||
224 | + | ||
225 | + }); | ||
193 | modal_busket_header_cont.click(function(){ // скрываем модальную корзину в хедере по ссылке | 226 | modal_busket_header_cont.click(function(){ // скрываем модальную корзину в хедере по ссылке |
194 | modal_busket_header.toggle(); | 227 | modal_busket_header.toggle(); |
195 | modal_busket_header_open.toggleClass('bh_cell_2'); // меняем класс у кнопочки вызова корзины хедера | 228 | modal_busket_header_open.toggleClass('bh_cell_2'); // меняем класс у кнопочки вызова корзины хедера |
@@ -270,6 +303,7 @@ $(document).ready(function(){ | @@ -270,6 +303,7 @@ $(document).ready(function(){ | ||
270 | forgot_pass_success_wrap.fadeOut(200); | 303 | forgot_pass_success_wrap.fadeOut(200); |
271 | busket_modal_wrapper.fadeOut(200); | 304 | busket_modal_wrapper.fadeOut(200); |
272 | callback_wrap.fadeOut(200); | 305 | callback_wrap.fadeOut(200); |
306 | + consultation_modal.fadeOut(200); | ||
273 | }); | 307 | }); |
274 | $(".close_modal").click(function(){ | 308 | $(".close_modal").click(function(){ |
275 | reg_wrap.fadeOut(200); | 309 | reg_wrap.fadeOut(200); |
@@ -467,15 +501,11 @@ $(document).ready(function(){ | @@ -467,15 +501,11 @@ $(document).ready(function(){ | ||
467 | 501 | ||
468 | //=============================================== BUSKET MODAL WINDOW FUNCTIONS | 502 | //=============================================== BUSKET MODAL WINDOW FUNCTIONS |
469 | 503 | ||
470 | - function send_call_me_back( num, type,callback ) | 504 | + function send_call_me_back( data,callback ) |
471 | { | 505 | { |
472 | $.ajax({ | 506 | $.ajax({ |
473 | url: '/site/mail', | 507 | url: '/site/mail', |
474 | - data : | ||
475 | - { | ||
476 | - 'num' : num, | ||
477 | - 'type' : type | ||
478 | - }, | 508 | + data : data, |
479 | type : 'POST', | 509 | type : 'POST', |
480 | dataType: 'json', | 510 | dataType: 'json', |
481 | success: function (data) | 511 | success: function (data) |