diff --git a/assets/css/gp-style-core.css b/assets/css/gp-style-core.css index afbe48d..347eccf 100644 --- a/assets/css/gp-style-core.css +++ b/assets/css/gp-style-core.css @@ -1781,6 +1781,8 @@ button{ background-position: center; transition: opacity .2s ease-out; + + z-index: 10; } .modal-form__close--white{ background-image: url(../img/svg/main/white-x.svg); @@ -1856,6 +1858,10 @@ button{ display: flex; justify-content: space-between; } +.modal-form-content__line--two-mobile{ + display: flex; + justify-content: space-between; +} .modal-form-content-line__element{ position: relative; } diff --git a/assets/css/gp-style-mobile.css b/assets/css/gp-style-mobile.css index a6b8f20..9117bd9 100644 --- a/assets/css/gp-style-mobile.css +++ b/assets/css/gp-style-mobile.css @@ -99,6 +99,9 @@ .modal-form-content__line--three .modal-form-content-line__element:nth-child(3){ width: 82px; } +.modal-form-content__line--two-mobile .modal-form-content-line__element{ + width: calc(50% - 12px); +} .form__input{ padding: 12px 14px; } @@ -204,6 +207,7 @@ .cabinet-card__content{ padding-right: 19px; } + /* .cabinet-card__order.active */ /* .cabinet-card__order.active */ /* cabinet */ diff --git a/assets/css/gp-style-order.css b/assets/css/gp-style-order.css index ec59a8d..68d5740 100644 --- a/assets/css/gp-style-order.css +++ b/assets/css/gp-style-order.css @@ -92,6 +92,14 @@ line-height: 133%; color: var(--text-6); } +.order-your-products__description span{ + font-weight: 700; +} +.order-your-products__description span::before{ + margin-left: 3px; + + content: 'x '; +} .order-your-products__right{ display: flex; } @@ -198,6 +206,8 @@ @media only screen and (max-width: 720px) { .order__title{ + max-width: 181px; + font-size: 20px; line-height: 120%; } @@ -219,4 +229,10 @@ width: 100%; } +.order-your-products__content{ + max-width: 164px; +} +.order-your-products__count, .order-your-products__price{ + flex-shrink: 0; +} } \ No newline at end of file diff --git a/assets/js/gp-form.js b/assets/js/gp-form.js index 9127c63..a9d3bf0 100644 --- a/assets/js/gp-form.js +++ b/assets/js/gp-form.js @@ -173,9 +173,6 @@ function remoteControl(main, button) { subject = document.querySelector(`.${subjectClass}`), buttons = Array.from(main.querySelectorAll(button)); - console.log(main); - - main.addEventListener('click', function (eventMain) { setTimeout(() => { let indexActive = buttons.findIndex((button, index) => { @@ -194,18 +191,52 @@ function remoteControl(main, button) { }) } -// formCheck('.modal-form__content', 'input[type=submit]'); -// formCheck('.modal-map__form', 'input[type=submit]'); +formCheck('.modal-form__content', 'input[type=submit]'); +formCheck('.modal-map__form', 'input[type=submit]'); + +function formCheck(form, submit) { + let forms = document.querySelectorAll(form); + + forms.forEach(form => { + let thisSubmit = form.querySelector(submit); + + thisSubmit.onclick = function () { + form.classList.add('check') + } + + }) +} -// function formCheck(form, submit) { -// let forms = document.querySelectorAll(form); +inputPhoneNoFlag('.no-flag'); -// forms.forEach(form => { -// let thisSubmit = form.querySelector(submit); +function inputPhoneNoFlag(input){ + let inputs = document.querySelectorAll(input); -// thisSubmit.onclick = function () { -// form.classList.add('check') -// } + inputs.forEach(input => { + let code = '+' + input.dataset.code; -// }) -// } \ No newline at end of file + input.onfocus = function () { + if (input.value == '') { + input.value = code; + } + } + + input.addEventListener('input', function(event) { + let text = event.target.value; + let length = text.length; + let newSymbol = event.data; + + if (isNaN(event.data) || event.data == ' ') { + event.target.value = text.slice(0, -1); + return; + } + + if (length == 3 || length == 7 || length == 11) { + if (newSymbol != null) { + event.target.value = text.slice(0, -1) + ' ' + newSymbol; + } + } + + }) + }) +} \ No newline at end of file diff --git a/order.html b/order.html index d6dc94e..289f4b3 100644 --- a/order.html +++ b/order.html @@ -238,7 +238,7 @@ -