This commit is contained in:
SBD
2023-11-21 20:19:17 +03:00
parent 3948c79891
commit 42f288e0e4
7 changed files with 232 additions and 65 deletions

View File

@@ -43,7 +43,7 @@
}
.block_overlay.n_profile{
height: 100%;
height: 105%;
width: 100%;
/*background: rgba(39, 53, 62, 0.7);*/
backdrop-filter: blur(6px);
@@ -978,11 +978,32 @@
width: calc(100% - 35px);
}
.to_address_point_txt.post_route.w_100{
border: 1px solid #E6E6E6;
width: calc(100% - 35px);
border-radius: 15px;
}
.from_address_point_txt.find_route.first.w_100{
width: calc(100% - 35px);
border-right: 1px solid #E6E6E6;
}
.from_address_point_txt.post_route.first.w_100{
width: calc(100% - 35px);
border-right: 1px solid #E6E6E6;
}
.to_address_point_txt.post_route.first.w_100{
width: calc(100% - 35px);
border-right: 1px solid #E6E6E6;
}
.to_address_point_txt.post_route.first.w_100{
width: calc(100% - 35px);
border-right: 1px solid #E6E6E6;
}
.to_address_point_txt.find_route.w_100{
border: 1px solid #E6E6E6;
width: calc(100% - 35px);
@@ -1009,6 +1030,46 @@
font-size: 14px;
}
.to_address_point_txt.post_route{
display: block;
border-left: 1px solid #E6E6E6;
border-top: 1px solid #E6E6E6;
border-right: 0;
border-bottom: 1px solid #E6E6E6;
color: #272424;
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 22px;
appearance: none;
margin-top: 10px;
height: 20px;
border-radius: 15px 0 0 15px;
padding: 20px 15.2px;
width: calc(100% - 95px);
}
.from_address_point_txt.post_route{
display: block;
border-left: 1px solid #E6E6E6;
border-top: 1px solid #E6E6E6;
border-right: 0;
border-bottom: 1px solid #E6E6E6;
color: #272424;
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 22px;
appearance: none;
margin-top: 10px;
height: 20px;
border-radius: 15px 0 0 15px;
padding: 20px 15.2px;
width: calc(100% - 95px);
}
.input_list.find_route{
width: 100%;
/* display: block; */
@@ -1112,6 +1173,10 @@
cursor: text;
}
.abbreviation_airport_in_search.post_route{
float: right;
}
.abbreviation_airport_in_search.hide{
display: none;
}
@@ -2293,6 +2358,20 @@
height: 695px;
}
.cut_width_f_curtain.n_profile{
position: fixed;
min-width: 1280px;
}
.cut_width_f_curtain.close{
z-index: -1;
}
.cut_width_f_curtain.open{
z-index: 101;
}
.cut_width_f_curtain.left{
max-width: 1280px;
text-align: -webkit-right;
@@ -2391,6 +2470,7 @@
}
.menu_buttons.left.open{
left: 0;
transition: 200ms;
@@ -2679,9 +2759,9 @@
}
.block_overlay.show.routes{
display: none;
}
/*.block_overlay.show.routes{*/
/* display: none;*/
/*}*/
.menu_buttons.left.close.filters{
width: 294px;

View File

@@ -5,6 +5,32 @@
// window.onfocus = function () {
// getSocketState()
// }
let map_of_words_en = new Map([
['закрыть'],['Close']
])
let map_of_words_ru = new Map([
['close'],['Закрыть']
])
function translate_words (word,lang){
let corr_word = word.toLowersCase()
let trans_word = null
if (lang === 'ru'){
trans_word = map_of_words_ru.get(`${corr_word}`)
} else if (lang === 'en') {
trans_word = map_of_words_en.get(`${corr_word}`)
}
}
function check_return_trans_word (str) {
if (!str === undefined && str === '' && str){
return str
} else {
console.log(`error! str = ${str}`)
}
}
window.onload = function (){
middleWareJS()
}

View File

@@ -232,32 +232,36 @@ function confirmRemove(el) {
function loader_place_ins_boris (el,type=null){
if (el){
let loader_place = document.querySelector(".abbreviation_airport_in_search")
let cur_loader_place = el.nextElementSibling
if (type){
cur_loader_place.innerHTML = ""
} else {
if (loader_place){
if (cur_loader_place.innerHTML === '<img src="/static/img/svg/loader.svg" style="height: 30px;padding-top: 17px;padding-left: 15px;">'){
cur_loader_place.innerHTML = ""
} else {
cur_loader_place.innerHTML = "<img src='/static/img/svg/loader.svg' style='height: 30px;padding-top: 17px;padding-left: 15px;'>"
}
changeWidthEL(el)
}
}
changeWidthEL(el)
}
}
function searchTown(el){
if (el.value.length > 0){
el.style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center';
// el.style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center';
}else {
el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
// el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
}
if(el.value.length>=3){
@@ -290,7 +294,7 @@ function searchTown(el){
// enctype: 'json',
data: JSON.stringify(get_address_point),
success: function(data){
el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
// el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
loader_place_ins_boris(el,"el")

View File

@@ -691,7 +691,7 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
let curtain = ''
let left_curtain = document.querySelector(".menu_buttons.left")
let right_curtain = document.querySelector(".menu_buttons.right")
let container_curtain = document.querySelector(".cut_width_f_curtain")
if (left || right){
if (left){
if (left_curtain){
@@ -738,12 +738,17 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
if (user_type === 'mobile' || user_type === 'laptop') {
curtain.classList.remove("open")
curtain.classList.add("close")
container_curtain.classList.remove("open")
container_curtain.classList.add("close")
closeOverlay()
} else if (!window.location.href.includes('profile')){
//
} else {
curtain.classList.remove("open")
curtain.classList.add("close")
container_curtain.classList.remove("open")
container_curtain.classList.add("close")
}
} else {
@@ -760,12 +765,14 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
if (user_type === 'mobile' || !window.location.host.includes('profile') || user_type === 'laptop' ) {
curtain.classList.toggle("open")
curtain.classList.toggle("close")
newCurtainZIndex()
let curtain_check = getOpenCurtain()
if (curtain_check.length > 1){
let curtain_old = getCurtainWIncreaceZindex(curtain_check,'decreace')['increace']
curtain_old.classList.toggle("close")
curtain_old.classList.toggle("open")
}
if (curtain_check.length > 0){
let overlay = document.querySelector('.block_overlay.show')
@@ -800,6 +807,8 @@ function open_curtain (left=null,right=null,overlay=null,close=null){
} else {
body.style.overflowY = 'hidden'
}
container_curtain.classList.toggle("close")
container_curtain.classList.toggle("open")
}
}

View File

@@ -77,7 +77,6 @@
{# boris change input #}
<input class="el_form_b_new_route" type="text" id="id_departure_DT" name="departure_DT" placeholder="" {% if form.initial.departure_DT %} value="{{ form.initial.departure_DT|date:"y.m.d H:m" }}"{% endif %}/>
<div id="displayRegervation"></div>
{# end #}
{% if not errors_off and form.errors and form.errors.departure_DT %}
<span>{{ form.errors.departure_DT }}</span>
@@ -111,68 +110,119 @@
<div class="from_to_country">
<div class="from_country_container">
<label for="id_from_address_point_txt">{{ form.fields.from_address_point.label }}</label>
<input
type="number"
name="from_address_point"
id="id_from_address_point"
class="el_form_b_new_route"
hidden
{% if form.initial.from_address_point %}value="{{ form.initial.from_address_point }}"{% endif %}
/>
<input
{# <input#}
{# type="number"#}
{# name="from_address_point"#}
{# id="id_from_address_point"#}
{# class="el_form_b_new_route"#}
{# hidden#}
{# {% if form.initial.from_address_point %}value="{{ form.initial.from_address_point }}"{% endif %}#}
{# />#}
{# <input#}
{# oninput="searchTown(this)"#}
{# onclick="showSearchList(this)"#}
{# onblur="onblurInputField(event, this)"#}
{# onFocus="this.select()"#}
{# autocomplete="off"#}
{# type="text"#}
{# minlength="3"#}
{##}
{# name="from_address_point_txt"#}
{# class="from_address_point_txt post_route el_form_b_new_route"#}
{# {% if form.fields.from_address_point.required %} required{% endif %}#}
{# id="id_from_address_point_txt"#}
{# {% if form.initial.from_address_point_txt %}value="{{ form.initial.from_address_point_txt }}"{% endif %}#}
{# />#}
{# <datalist id="from_address_point">#}
{##}
{# </datalist>#}
{##}
{# <div class="input_list post_route" name="from_address_point_txt_list">#}
{##}
{# </div>#}
{# boris changed input#}
<div class="container_inp_w_abr">
<input
type="number"
name="from_address_point"
id="id_from_address_point"
class="el_form_find_route"
hidden
class="disp-none"
{% if route_form.initial.from_address_point %}value="{{ route_form.initial.from_address_point}}"{% endif %}/>
<input
oninput="searchTown(this)"
onclick="showSearchList(this)"
onblur="onblurInputField(event, this)"
onFocus="this.select()"
autocomplete="off"
type="text"
minlength="3"
name="from_address_point_txt"
class="from_address_point_txt post_route el_form_b_new_route"
{% if form.fields.from_address_point.required %} required{% endif %}
{# {% if form.fields.to_address_point.required %} required{% endif %}#}
id="id_from_address_point_txt"
{% if form.initial.from_address_point_txt %}value="{{ form.initial.from_address_point_txt }}"{% endif %}
/>
<datalist id="from_address_point">
</datalist>
<div class="input_list post_route" name="from_address_point_txt_list">
class="from_address_point_txt post_route first"
{% if route_form.initial.from_address_point %}value="{{ route_form.initial.from_address_point }}"{% endif %}/>
<div class="abbreviation_airport_in_search post_route" onclick="focusOnInput(this)"></div>
<div class="input_list post_route" name="from_address_point_txt_list"></div>
</div>
{% if not errors_off and form.errors and form.errors.from_address_point %}
<span>{{ form.errors.from_address_point}}</span>
{% endif %}
</div>
<div>
<label for="id_to_address_point_txt">{{ form.fields.to_address_point.label }}</label>
<input
type="number"
name="to_address_point"
id="id_to_address_point"
class="el_form_b_new_route"
hidden
{% if form.initial.to_address_point %}value="{{ form.initial.to_address_point}}"{% endif %}
/>
<input
oninput="searchTown(this)"
onclick="showSearchList(this)"
onblur="onblurInputField(event, this)"
<label for="id_from_address_point_txt">{{ form.fields.to_address_point.label }}</label>
{# <input#}
{# type="number"#}
{# name="to_address_point"#}
{# id="id_to_address_point"#}
{# class="el_form_b_new_route"#}
{# hidden#}
{# {% if form.initial.to_address_point %}value="{{ form.initial.to_address_point}}"{% endif %}#}
{# />#}
{# <input#}
{# oninput="searchTown(this)"#}
{# onclick="showSearchList(this)"#}
{# onblur="onblurInputField(event, this)"#}
{##}
{# onFocus="this.select()"#}
{# autocomplete="off"#}
{# type="text"#}
{# name="to_address_point_txt"#}
{# {% if form.fields.to_address_point.required %} required{% endif %}#}
{# id="id_to_address_point_txt"#}
{# class="to_address_point_txt post_route el_form_b_new_route"#}
{# {% if form.initial.to_address_point_txt %}value="{{ form.initial.to_address_point_txt}}"{% endif %}#}
{##}
{# />#}
{# <div class="input_list post_route" name="to_address_point_txt_list">#}
{##}
{# </div>#}
<div class="container_inp_w_abr">
<input
type="number"
name="to_address_point"
id="id_to_address_point"
class="el_form_find_route"
hidden
class="disp-none"
{% if route_form.initial.to_address_point %}value="{{ route_form.initial.to_address_point}}"{% endif %}/>
<input
oninput="searchTown(this)"
onclick="showSearchList(this)"
onblur="onblurInputField(event, this)"
onFocus="this.select()"
autocomplete="off"
type="text"
name="to_address_point_txt"
{% if form.fields.to_address_point.required %} required{% endif %}
id="id_to_address_point_txt"
class="to_address_point_txt post_route el_form_b_new_route"
{% if form.initial.to_address_point_txt %}value="{{ form.initial.to_address_point_txt}}"{% endif %}
/>
<div class="input_list post_route" name="to_address_point_txt_list">
</div>
onFocus="this.select()"
autocomplete="off"
type="text"
name="to_address_point_txt"
{# {% if form.fields.to_address_point.required %} required{% endif %}#}
id="id_to_address_point_txt"
class="to_address_point_txt post_route"
{% if route_form.initial.to_address_point_txt %}value="{{ route_form.initial.to_address_point_txt}}"{% endif %}/>
<div class="abbreviation_airport_in_search" onclick="focusOnInput(this)"></div>
<div class="input_list post_route" name="to_address_point_txt_list"></div>
</div>
{% if not errors_off and form.errors and form.errors.to_address_point %}
<span>{{ form.errors.to_address_point }}</span>
{% endif %}
@@ -226,7 +276,7 @@
<span>{{ form.errors.to_place }}</span>
{% endif %}
</div>
<div class="clear_both"></div>
<div class="clear_both"></div>
</div>
<hr>
@@ -357,7 +407,7 @@
<div>
<input type="checkbox" name="receive_msg_by_email" class="custom-checkbox" id="id_receive_msg_by_email">
<label for="id_receive_msg_by_email">
<label for="id_receive_msg_by_email">s
<div class="receive_msg_by_email">{{ form.fields.receive_msg_by_email.label }}</div>
<img id="img_msg_by_email"

View File

@@ -71,9 +71,7 @@
class="to_address_point_txt find_route"
{% if route_form.initial.to_address_point_txt %}value="{{ route_form.initial.to_address_point_txt}}"{% endif %}/>
<div class="abbreviation_airport_in_search" onclick="focusOnInput(this)"></div>
<div class="input_list find_route" name="to_address_point_txt_list">
</div>
<div class="input_list find_route" name="to_address_point_txt_list"></div>
</div>
</div>
<div class="cont-el-form-search-carrier">

View File

@@ -50,7 +50,7 @@
<script src="{% static "js/range_calendar.js" %}"></script>
{% block meta %}
{% endblock %}
{% endblock %}s
</head>
<body {% if page_type == 'routes' %}onscroll="scroll_ev(event,this)" {% endif %}>
<div class="block_overlay {% if page_type == 'profile' %}show{% elif page_type == 'routes' %} routes n_profile{% else %}hidden n_profile{% endif %}" onclick="open_curtain()"></div>
@@ -58,8 +58,8 @@
{% include 'blocks/b_header.html' %}
<div class="cut_width_f_curtain">
<div class="menu_buttons curtain right {% if page_type == 'profile' %}open{% else %} close{% endif %}" data-name="Меню">
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %}" onclick="open_curtain()">
<div class="menu_buttons curtain right {% if page_type == 'profile' %}open{% else %} n_profile close{% endif %}" data-name="Меню">
{% include "blocks/profile/b_buttons_menu_profile.html" %}
<div class="handler_menu close" onclick="open_curtain(null,'right')">