diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 93d2a21..bb00b91 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -11,7 +11,7 @@ } .text-align-center{ - text-align: center; + text-align: -webkit-center; width: 100%; } @@ -552,6 +552,8 @@ padding: 20px; font-size: 16px; display: block; + overflow: hidden; + text-overflow: ellipsis; } .insert_users{ @@ -1460,4 +1462,17 @@ font-size: 18px; font-weight: 600; border-radius: 10px; +} + +.button-find-more-routes.hide{ + display: none; +} + +.loader_f_loading_routes{ + width: 25px; + height: 25px; + display: none; +} +.loader_f_loading_routes.show{ + display: block; } \ No newline at end of file diff --git a/static/js/dynamic_loading_routes.js b/static/js/dynamic_loading_routes.js index 973a87e..82488c0 100644 --- a/static/js/dynamic_loading_routes.js +++ b/static/js/dynamic_loading_routes.js @@ -2,6 +2,9 @@ let page_iterator = 2 function load_routes (el) { + let loader = document.querySelector(".loader_f_loading_routes") + loader.classList.toggle("show") + el.classList.toggle("hide") event.preventDefault() // let el_parent = el.parentNode // let new_el = el_parent.previousSibling.previousSibling @@ -25,12 +28,21 @@ function load_routes (el) { // enctype: 'json', data: JSON.stringify(data), success: function(data){ + // new_el.parentNode.insertBefore(data.html, new_el.nextSibling); let url_insert = ".page_routes_" + page_iterator - document.querySelector(url_insert).innerHTML = data.html + let place_ins = document.querySelector(url_insert) + place_ins.innerHTML = data.html let old_page_iterator = page_iterator page_iterator++ - + loader.classList.toggle("show") + el.classList.toggle("hide") + let el_scroll = place_ins.firstElementChild + el_scroll.scrollIntoView( + { + behavior:"smooth" + } + ) let new_page_routes = document.createElement("div") new_page_routes.classList.add("page_routes_" + page_iterator) $(new_page_routes).insertAfter(".page_routes_" + old_page_iterator); diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index 76c496b..b02c830 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -219,6 +219,7 @@