This commit is contained in:
2023-09-08 17:56:48 +03:00
parent 31379e0949
commit b0f138489d
5 changed files with 136 additions and 8 deletions

View File

@@ -48,18 +48,34 @@ function filters_func_find_route_main (el,owner_type=null,win_loc_replace=null){
document.querySelector(".loader_filters_routes").classList.toggle("show")
document.querySelector(".block-finded-routes").innerHTML = data.html
if (data.html === "\n\n\n\n\n"){
document.querySelector(".block-finded-routes").innerHTML = "<span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>"
// document.querySelector(".block-finded-routes").innerHTML = "<span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>"
document.querySelector(".block-finded-routes").innerHTML = "<div class=\"not_found_routes show\">\n" +
" <div class=\"text-align-center fw-700 fz-24 c-txt-b2 m-a w-80 m-t-8p\">\n" +
" Упс... <span class=\"orange-text\">Ничего не найдено</span>, попробуйте\n" +
" изменить параметры поиска или оставьте заявку\n" +
" на перевозку посылки\n" +
" </div>\n" +
" <img class=\"boxes_not_fond_routes left\" src=\"/static/img/boxes_for_not_found_routes/b_1.svg\"\">\n" +
" <img class=\"boxes_not_fond_routes right\" src=\"/static/img/boxes_for_not_found_routes/b_2.svg\"\">\n" +
" </div>"
} else {
document.querySelector(".block-finded-routes").innerHTML = data.html
}
// window.location.href = window.location.href + "?" + get_url
// window.location.search = "?" + get_url
history.pushState({'data':data_d,'str_data':get_url}, "state_filters", `?${get_url}`);
let element = document.createElement("img")
element.classList.add("loader_filters_routes")
element.src = "/static/img/svg/loader.svg"
// let element = document.createElement("img")
// element.classList.add("loader_filters_routes")
// element.src = "/static/img/svg/loader.svg"
let div = document.createElement("div")
div.classList.add("width-100")
div.classList.add("text-align-center")
div.classList.add("mb-10")
div.innerHTML = "<img src='/static/img/svg/loader.svg' class='loader_filters_routes'/>"
let ins_bef_el = document.querySelector(".block-finded-routes").firstChild
$(element).insertBefore(ins_bef_el)
$(div).insertBefore(ins_bef_el)
// window.history.pushState({data:get_url
// },{})
},