0.8.379
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user