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

@@ -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")