0.0.97 preloader for addres_point
This commit is contained in:
@@ -167,8 +167,17 @@ function confirmRemove(el) {
|
|||||||
|
|
||||||
function searchTown(el){
|
function searchTown(el){
|
||||||
|
|
||||||
document.getElementById('id_from_address_point_txt').style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center';
|
let from_ap = document.getElementById('id_from_address_point_txt');
|
||||||
document.getElementById('id_to_address_point_txt').style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center';
|
let to_ap = document.getElementById('id_to_address_point_txt');
|
||||||
|
|
||||||
|
if(el.value.length>0){
|
||||||
|
from_ap.style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center';
|
||||||
|
to_ap.style.background = 'white url("/static/img/svg/loader.svg") no-repeat calc(100% - 15px) center';
|
||||||
|
} else{
|
||||||
|
from_ap.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
|
||||||
|
to_ap.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(el.value.length>=3){
|
if(el.value.length>=3){
|
||||||
let timer = null
|
let timer = null
|
||||||
@@ -195,8 +204,11 @@ function searchTown(el){
|
|||||||
// enctype: 'json',
|
// enctype: 'json',
|
||||||
data: JSON.stringify(get_address_point),
|
data: JSON.stringify(get_address_point),
|
||||||
success: function(data){
|
success: function(data){
|
||||||
document.getElementById('id_from_address_point_txt').style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
|
|
||||||
document.getElementById('id_to_address_point_txt').style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
|
from_ap.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
|
||||||
|
to_ap.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getNewMessageSession()
|
getNewMessageSession()
|
||||||
|
|||||||
Reference in New Issue
Block a user