From fc9951ab4668778f375caa9d2b84f79a977ce483 Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 28 Jul 2023 21:11:49 +0300 Subject: [PATCH] 0.0.51 revert autocomlete --- static/js/autocomlite.js | 41 +-- templates/blocks/profile/b_new_route.html | 364 +++++++++++++--------- templates/widgets/w_data_list_txt.html | 6 - 3 files changed, 223 insertions(+), 188 deletions(-) delete mode 100644 templates/widgets/w_data_list_txt.html diff --git a/static/js/autocomlite.js b/static/js/autocomlite.js index d011f6c..6a7da15 100644 --- a/static/js/autocomlite.js +++ b/static/js/autocomlite.js @@ -64,8 +64,6 @@ function insertSearchList(data, ctrl_name) { } } - - function showSearchList() { let input_list = document.getElementsByClassName('input_list'); if(input_list.classList.contains('show')){ @@ -74,30 +72,15 @@ function showSearchList() { } -// function onblurInputField(event,el){ -// -// // if(el.classList.contains("from_country_container")){ -// let search_list = document.getElementsByName(el.name + '_list')[0]; -// let parent_event = $(event.explicitOriginalTarget).parents('.input_list' ); -// if(!parent_event || parent_event[0] !== search_list){ -// -// search_list.classList.remove('show') -// } -// -// // } -// } -// function onblurInputField(el){ -// -// // if(el.classList.contains("from_country_container")){ -// let search_list = document.getElementsByName(el.name + '_list')[0]; -// // let parent_event = $(event.explicitOriginalTarget).parents('.input_list' ); -// // if(!parent_event || parent_event[0] !== search_list){ -// // -// // search_list.classList.remove('show') -// // } -// if(search_list.classList.contains('show')){ -// search_list.classList.remove('show') -// } -// -// // } -// } \ No newline at end of file +function onblurInputField(event,el){ + + // if(el.classList.contains("from_country_container")){ + let search_list = document.getElementsByName(el.name + '_list')[0]; + let parent_event = $(event.explicitOriginalTarget).parents('.input_list' ); + if(!parent_event || parent_event[0] !== search_list){ + + search_list.classList.remove('show') + } + + // } +} \ No newline at end of file diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index b1a39c4..3a559a4 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -35,14 +35,66 @@
- + + {% if form.errors and form.errors.departure_DT %} + {{ form.errors.departure_DT }} + {% endif %} +
+
+ + + {% if form.errors and form.errors.arrival_DT %} + {{ form.errors.arrival_DT }} + {% endif %} +
+ +
+
+
+ + + +
+
+ {% if form.errors and form.errors.from_address_point %} + {{ form.errors.from_address_point}} + {% endif %} +
+
+ + + {{ form.errors.departure_DT }} {% endif %} @@ -70,18 +122,13 @@ - - - -
{% if form.errors and form.errors.from_address_point %} @@ -101,83 +148,94 @@ id="id_to_address_point_txt" {% if form.cleaned_data.to_address_point_txt %}value="{{ form.cleaned_data.to_address_point_txt}}"{% endif %} - /> -
+ /> +
+ +
+ {% if form.errors and form.errors.to_address_point %} + {{ form.errors.to_address_point }} + {% endif %} +
+
+ {#
#} + {# #} + {# #} + {#
#} + {#
#} + {# #} + {# #} + {#
#} +
+
+ + + {% if form.errors and form.errors.from_place %} + {{ form.errors.from_place }} + {% endif %} +
+
+ + + {% if form.errors and form.errors.to_place %} + {{ form.errors.to_place }} + {% endif %} +
+
+ +
+ +
+ +
+ {#
#} + {# #} + {# {% for item in form.fields.cargo_type.choices %}#} + {# {{ item.1 }}#} + {# #} + {# {% endfor %}#} + {##} + {# #} + + {#
#} -
- {% if form.errors and form.errors.to_address_point %} - {{ form.errors.to_address_point }} - {% endif %} - - -{#
#} -{# #} -{# #} -{#
#} -{#
#} -{# #} -{# #} -{#
#} -
- - - {% if form.errors and form.errors.from_place %} - {{ form.errors.from_place }} - {% endif %} -
-
- - - {% if form.errors and form.errors.to_place %} - {{ form.errors.to_place }} - {% endif %} -
-
- -
- -
- -
-{#
#} -{# #} -{# {% for item in form.fields.cargo_type.choices %}#} -{# {{ item.1 }}#} -{# #} -{# {% endfor %}#} -{##} -{# #} - -{#
#} - + {% for item in form.fields.cargo_type.choices %} + {{ item.1 }} + {% endfor %}
{% for item in form.fields.cargo_type.choices %} {{ item.1 }} {% endfor %} -{# #} -{##} -{# #} - {% if form.errors and form.errors.cargo_type %} - {{ form.errors.cargo_type }} - {% endif %} -
+ {# #} + {##} + {# #} + {% if form.errors and form.errors.cargo_type %} + {{ form.errors.cargo_type }} + {% endif %} + -
+
-
- - - {% if form.errors and form.errors.weight %} - {{ form.errors.weight }} - {% endif %} -
- -
- -
-
- - - {% if form.errors and form.errors.phone %} - {{ form.errors.phone }} +
+ + + {% if form.errors and form.errors.weight %} + {{ form.errors.weight }} {% endif %} -
+
-
+
- - - {% if form.errors and form.errors.extra_phone %} - {{ form.errors.extra_phone }} - {% endif %} -
-
+
+
+ + + /> + {% if form.errors and form.errors.phone %} + {{ form.errors.phone }} + {% endif %} +
-
- - - {% if form.errors and form.errors.receive_msg_by_email %} - {{ form.errors.receive_msg_by_email }} - {% endif %} -
-
- -
+
+ + + + {% if form.errors and form.errors.extra_phone %} + {{ form.errors.extra_phone }} + {% endif %} +
+
+ +
+ +
+ + + {% if form.errors and form.errors.receive_msg_by_email %} + {{ form.errors.receive_msg_by_email }} + {% endif %} +
+
+ +
{% endif %} diff --git a/templates/widgets/w_data_list_txt.html b/templates/widgets/w_data_list_txt.html deleted file mode 100644 index 65b1032..0000000 --- a/templates/widgets/w_data_list_txt.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -