0.0.58 upd route_info
This commit is contained in:
@@ -1118,10 +1118,16 @@ input#id_cargo_type{
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.errorlist.hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*my routes*/
|
/*my routes*/
|
||||||
|
|
||||||
.my_route{
|
.my_route{
|
||||||
|
width: 100%;
|
||||||
|
height: 296px;
|
||||||
background-color: White;
|
background-color: White;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin: 2% 0 0 0;
|
margin: 2% 0 0 0;
|
||||||
@@ -1129,16 +1135,85 @@ input#id_cargo_type{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.route_info{
|
.route_info{
|
||||||
|
vertical-align: top;
|
||||||
border-style: inset;
|
border-style: inset;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-color: transparent #F8F8F8 transparent transparent;
|
border-color: transparent #F8F8F8 transparent transparent;
|
||||||
width: 59%;
|
width: 59%;
|
||||||
float: left;
|
height: 280px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.route_info_about>span:first-child{
|
||||||
|
background: url("/static/img/png/Tag.png") left center no-repeat;
|
||||||
|
margin: 0 20px 0 20px;
|
||||||
|
padding-left: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.route_info_about>span:nth-child(2){
|
||||||
|
background: url("/static/img/png/Scales.png") left center no-repeat;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route_info_about>span:last-child{
|
||||||
|
background: url("/static/img/png/Airplane.png") left center no-repeat;
|
||||||
|
float: right;
|
||||||
|
margin-right: 20px;
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.route_contact{
|
.route_contact{
|
||||||
width: 40%;
|
width: 40%;
|
||||||
float: right;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*my routes*/
|
#edit_route {
|
||||||
|
display: block;
|
||||||
|
height: 44px;
|
||||||
|
width: 285px;
|
||||||
|
background: #FF613A;
|
||||||
|
color: #FFF;
|
||||||
|
font-family: Inter;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
line-height: 26px;
|
||||||
|
border-radius: 10px;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button_remove_route {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
button#remove_route {
|
||||||
|
height: 44px;
|
||||||
|
width: 285px;
|
||||||
|
}
|
||||||
|
.confirm_remove{
|
||||||
|
width: 43% !important;
|
||||||
|
background: #ff0000a8;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: white;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
button.cancel_remove{
|
||||||
|
height: 44px;
|
||||||
|
width: 43%;
|
||||||
|
background: #808080cc;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: white;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*my routes END*/
|
||||||
|
|||||||
BIN
static/img/png/Airplane.png
Normal file
BIN
static/img/png/Airplane.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 372 B |
BIN
static/img/png/Car.png
Normal file
BIN
static/img/png/Car.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 330 B |
BIN
static/img/png/Scales.png
Normal file
BIN
static/img/png/Scales.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 508 B |
BIN
static/img/png/Tag.png
Normal file
BIN
static/img/png/Tag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 346 B |
@@ -84,3 +84,12 @@ function onblurInputField(event,el){
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// function hideErrorMsg(el) {
|
||||||
|
// let hide_element = document.querySelector()
|
||||||
|
// if(el.value !== 0){
|
||||||
|
// hide_element.classList.add('hide')
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
@@ -70,3 +70,4 @@ function getRoute(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,35 +62,24 @@ function OnSelectionChange(el) {
|
|||||||
// location.href = '/profile'
|
// location.href = '/profile'
|
||||||
document.querySelector(".info_profile").innerHTML = data.html
|
document.querySelector(".info_profile").innerHTML = data.html
|
||||||
//
|
//
|
||||||
// $(document).ready(function (e){
|
|
||||||
// $('#id_weight').ionRangeSlider({
|
|
||||||
// skin: "round",
|
|
||||||
// type: "single",
|
|
||||||
// min: 0,
|
|
||||||
// max: 1000,
|
|
||||||
// from: 100,
|
|
||||||
// step: 1,
|
|
||||||
// grid: true,
|
|
||||||
// grid_num: 5,
|
|
||||||
// }
|
|
||||||
|
|
||||||
//get dynamic value
|
$('#id_weight').ionRangeSlider({
|
||||||
// let fromCountry = document.getElementById('id_from_country');
|
skin: "round",
|
||||||
// let toCounytry = document.getElementById('id_to_country')
|
type: "single",
|
||||||
//
|
min: 0,
|
||||||
// toCounytry.oninput = function (){
|
max: 1000,
|
||||||
// console.log(toCounytry.value)
|
from: 0,
|
||||||
// }
|
step: 1,
|
||||||
// fromCountry.oninput = function (){
|
grid: true,
|
||||||
// console.log(fromCountry.value)
|
grid_num: 5,
|
||||||
//
|
});
|
||||||
// };
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -93,3 +93,19 @@ function myProfile(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function confirmRemove(el) {
|
||||||
|
let place = document.querySelector('.button_remove_route')
|
||||||
|
// let new_button = document.querySelector('.cancel_remove')
|
||||||
|
// if(!button){
|
||||||
|
let cancel_button = document.createElement('button')
|
||||||
|
cancel_button.className = "cancel_remove";
|
||||||
|
cancel_button.innerText = "Отменить удаление";
|
||||||
|
place.appendChild(cancel_button);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
el.classList.add('confirm_remove')
|
||||||
|
el.innerText = 'Подтвердить удаление'
|
||||||
|
|
||||||
|
}
|
||||||
@@ -123,6 +123,7 @@
|
|||||||
<label for="id_from_place">{{ form.fields.from_place.label }}</label>
|
<label for="id_from_place">{{ form.fields.from_place.label }}</label>
|
||||||
<select
|
<select
|
||||||
name="from_place"
|
name="from_place"
|
||||||
|
{# onchange="hideErrorMsg(this)"#}
|
||||||
id="id_from_place"
|
id="id_from_place"
|
||||||
{% if form.fields.from_place.required %} required{% endif %}>
|
{% if form.fields.from_place.required %} required{% endif %}>
|
||||||
{% for item in form.fields.from_place.choices %}
|
{% for item in form.fields.from_place.choices %}
|
||||||
|
|||||||
@@ -1,47 +1,69 @@
|
|||||||
{% for route in routes %}
|
{% for route in routes %}
|
||||||
<div class="my_route">
|
<div class="my_route">
|
||||||
<div class="route_info">
|
<div class="route_info">
|
||||||
{{ route.get_cargo_type_display }}
|
<div class="route_info_about">
|
||||||
{{ route.weight }}
|
<span>
|
||||||
{{ route.get_type_transport_display }}
|
Тип:{{ route.get_cargo_type_display }}
|
||||||
<div class="route_info_point">
|
</span>
|
||||||
{{ route.from_country.name }}/{{ route.from_city.name }}
|
|
||||||
<br>
|
|
||||||
{{ route.to_country.name }}/{{ route.to_city.name }}
|
|
||||||
</div>
|
|
||||||
<div class="route_info_date">
|
|
||||||
Отправка: {{route.departure_DT }}
|
|
||||||
Прибытие: {{route.arrival_DT }}
|
|
||||||
</div>
|
|
||||||
<div class="route_info_ft_place">
|
|
||||||
Откуда заберёт:{{ route.from_place }}
|
|
||||||
Куда доставит:{{ route.to_place }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="route_contact">
|
<span>
|
||||||
<h2>Контакты перевозчика:</h2>
|
Вес:{{ route.weight }} кг
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="route_contact_name">
|
<span>
|
||||||
{{ route.owner.last_name }} {{ route.owner.first_name }}
|
|
||||||
</div>
|
{{ route.get_type_transport_display }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="route_info_point">
|
||||||
|
{{ route.from_country.name }}/{{ route.from_city.name }}
|
||||||
|
<br>
|
||||||
|
{{ route.to_country.name }}/{{ route.to_city.name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="route_info_date">
|
||||||
|
Отправка: {{route.departure_DT }}
|
||||||
|
Прибытие: {{route.arrival_DT }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="route_info_ft_place">
|
||||||
|
Откуда заберёт:{{ route.from_place }}
|
||||||
|
Куда доставит:{{ route.to_place }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="route_contact_phone_email">
|
|
||||||
{{ route.phone }}
|
|
||||||
<br>
|
|
||||||
{{ route.extra_phone }}
|
|
||||||
<br>
|
|
||||||
{{ route.owner.email }}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="route_contact">
|
||||||
|
|
||||||
|
<h2>Контакты перевозчика:</h2>
|
||||||
|
|
||||||
|
<div class="route_contact_name">
|
||||||
|
{{ route.owner.last_name }} {{ route.owner.first_name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="route_contact_phone_email">
|
||||||
|
{{ route.phone }}
|
||||||
|
<br>
|
||||||
|
{{ route.extra_phone }}
|
||||||
|
<br>
|
||||||
|
{{ route.owner.email }}
|
||||||
|
</div>
|
||||||
|
<div class="button_edit_route">
|
||||||
|
<button
|
||||||
|
id="edit_route">
|
||||||
|
Редактировать
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="button_remove_route">
|
||||||
|
<button
|
||||||
|
onclick="confirmRemove(this)"
|
||||||
|
id="remove_route">
|
||||||
|
Удалить
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user