Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -1084,7 +1084,7 @@ div.departure_arrival>div>input{
|
|||||||
|
|
||||||
.input_list{
|
.input_list{
|
||||||
display: none;
|
display: none;
|
||||||
width: 24%;
|
width: 390px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
@@ -1096,7 +1096,7 @@ div.departure_arrival>div>input{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input_list.show{
|
.input_list.show{
|
||||||
display:block;
|
display:inline-block;
|
||||||
|
|
||||||
}
|
}
|
||||||
.input_list .hide{
|
.input_list .hide{
|
||||||
|
|||||||
@@ -156,42 +156,48 @@ function confirmRemove(el) {
|
|||||||
|
|
||||||
function searchTown(el){
|
function searchTown(el){
|
||||||
|
|
||||||
let timer = null
|
if(el.textLength>=3){
|
||||||
if (timer) {
|
let timer = null
|
||||||
clearTimeout(timer);
|
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')
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
timer = setTimeout(function(){
|
||||||
}, 1500);
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
onFocus="this.select()"
|
onFocus="this.select()"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
type="text"
|
type="text"
|
||||||
|
minlength="3"
|
||||||
name="from_address_point_txt"
|
name="from_address_point_txt"
|
||||||
class="from_address_point_txt"
|
class="from_address_point_txt"
|
||||||
{% if form.fields.from_address_point.required %} required{% endif %}
|
{% if form.fields.from_address_point.required %} required{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user