Merge remote-tracking branch 'origin/main'

This commit is contained in:
2023-08-09 19:17:16 +03:00
3 changed files with 42 additions and 35 deletions

View File

@@ -1084,7 +1084,7 @@ div.departure_arrival>div>input{
.input_list{
display: none;
width: 24%;
width: 390px;
height: 200px;
position: absolute;
padding-top: 20px;
@@ -1096,7 +1096,7 @@ div.departure_arrival>div>input{
}
.input_list.show{
display:block;
display:inline-block;
}
.input_list .hide{

View File

@@ -156,42 +156,48 @@ function confirmRemove(el) {
function searchTown(el){
let timer = null
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(function(){
timer = null;
let form = el.form;
let type_transport = form['type_transport'].value;
let search_str = el.value;
let get_address_point = new Object({type_transport, search_str});
get_address_point['ctrl_name'] = el.name;
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/reference_data/get_address_point/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(get_address_point),
success: function(data){
getNewMessageSession()
return insertSearchList(data, el.name + '_list')
},
error: function (data){
console.log('Error')
if(el.textLength>=3){
let timer = null
if (timer) {
clearTimeout(timer);
}
});
}, 1500);
timer = setTimeout(function(){
timer = null;
let form = el.form;
let type_transport = form['type_transport'].value;
let search_str = el.value;
let get_address_point = new Object({type_transport, search_str});
get_address_point['ctrl_name'] = el.name;
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/reference_data/get_address_point/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(get_address_point),
success: function(data){
getNewMessageSession()
return insertSearchList(data, el.name + '_list')
},
error: function (data){
console.log('Error')
}
});
}, 1500);
}
}

View File

@@ -80,6 +80,7 @@
onFocus="this.select()"
autocomplete="off"
type="text"
minlength="3"
name="from_address_point_txt"
class="from_address_point_txt"
{% if form.fields.from_address_point.required %} required{% endif %}