Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -367,7 +367,7 @@
|
||||
|
||||
|
||||
.info_profile>div>div>.left-part-carrier-card>.container_inf_about_moving{
|
||||
width: 100%;
|
||||
width: 98%;
|
||||
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
|
||||
ч
|
||||
.arrange_subscribe{
|
||||
margin: 20px auto 20px auto;
|
||||
}
|
||||
@@ -1114,9 +1114,12 @@
|
||||
.left-part-carrier-card, .inf_carrier_container{
|
||||
width: unset;
|
||||
float: none;
|
||||
padding: 1px 15px;
|
||||
padding: 1px 20px;
|
||||
border-right: unset;
|
||||
}
|
||||
.control_frame{
|
||||
top: 3px;
|
||||
}
|
||||
.inf_carrier_container{
|
||||
padding-top: 70px;
|
||||
padding-bottom: 10px;
|
||||
@@ -1194,7 +1197,7 @@
|
||||
.from-to-city-text{
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
padding-bottom: 10px;
|
||||
/*padding-bottom: 10px;*/
|
||||
/*padding-top: unset;*/
|
||||
}
|
||||
.arrow_inf_about_moving{
|
||||
@@ -1836,6 +1839,10 @@
|
||||
/*.from_address_point_txt.find_route.first {*/
|
||||
/* width: 52.1%;*/
|
||||
/*}*/
|
||||
.info_profile>div>div>.left-part-carrier-card>.container_inf_about_moving{
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
|
||||
.container_inf_about_moving {
|
||||
width: 97%;
|
||||
@@ -1876,6 +1883,10 @@
|
||||
|
||||
|
||||
|
||||
.info_profile>div>div>.left-part-carrier-card>.container_inf_about_moving{
|
||||
width: 89%;
|
||||
}
|
||||
|
||||
.phones_carrier{
|
||||
display: block;
|
||||
}
|
||||
@@ -1901,6 +1912,7 @@
|
||||
|
||||
.container_inf_about_moving{
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.arrow_inf_about_moving{
|
||||
|
||||
@@ -1562,6 +1562,7 @@ a.open_inf_carrier{
|
||||
width: 33%;
|
||||
float: right;
|
||||
padding: 2%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title_container_inf_carrier{
|
||||
|
||||
@@ -697,12 +697,13 @@ header .header-second {
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
width: 272px;
|
||||
height: 175px;
|
||||
box-shadow: -1px 4px 10px 0px rgba(198, 199, 203, 0.20), 0px -1px 10px 0px rgba(198, 199, 203, 0.20);
|
||||
z-index: 1;
|
||||
border: 1px solid #FF613A;
|
||||
padding: 0 10px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 18px;
|
||||
}
|
||||
|
||||
.control_frame.show{
|
||||
@@ -726,6 +727,28 @@ button#send_upgrade:hover {
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.success_rising{
|
||||
display: none;
|
||||
}
|
||||
.success_rising.show{
|
||||
display: block;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.success_rising_text{
|
||||
text-align: center;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.close_success_rising{
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.upd_form.hide{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.from_address_point_txt.red_text{
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
@@ -616,6 +616,7 @@ function confirmUpgrade(el, routeID){
|
||||
event.preventDefault()
|
||||
el.disabled = true
|
||||
|
||||
|
||||
// let remainsRisingCount = parseInt(document.getElementById('remains_route_rising_count').innerText);
|
||||
// let remainsHighlightCount = parseInt(document.getElementById('remains_route_highlight_count').innerText);
|
||||
|
||||
@@ -652,38 +653,13 @@ function confirmUpgrade(el, routeID){
|
||||
data: formData,
|
||||
success: function(data){
|
||||
|
||||
// $('#remains_route_rising_count').append(data.remains_route_rising_count)
|
||||
// $('#remains_route_highlight_count').append(data.remains_route_highlight_count)
|
||||
el.disabled = false
|
||||
|
||||
// if(url === '/routes/raise_route/' && remainsRisingCount > 0 ){
|
||||
// remainsRisingCount -= 1;
|
||||
// } else if(url === '/routes/highlight_route/' && remainsHighlightCount > 0){
|
||||
// remainsHighlightCount -= 1;
|
||||
// }
|
||||
|
||||
|
||||
// for (let i = 0; i < checkboxes.length; i++) {
|
||||
//
|
||||
// if (checkboxes[i].checked && remainsRisingCount > 0 ) {
|
||||
// remainsRisingCount -= 1;
|
||||
// }else if(checkboxes[i].checked && remainsHighlightCount > 0){
|
||||
// remainsHighlightCount -= 1;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// document.getElementById('remains_route_rising_count').outerHTML = data.remains_route_rising_count.toString();
|
||||
// document.getElementById('remains_route_highlight_count').outerHTML = data.remains_route_highlight_count.toString();
|
||||
|
||||
|
||||
// location.href = '/profile'
|
||||
|
||||
// if(!data.status){
|
||||
// document.querySelector('[data-number-of-route="' + routeID + '"]').innerHTML = data.html
|
||||
// }
|
||||
if (url ==='/routes/raise_route/' && data.status){
|
||||
// document.getElementById('upd_form_' + routeID).classList.toggle('hide')
|
||||
// document.getElementById('success_rising_'+ routeID).classList.toggle('show')
|
||||
showControlFrame(el, routeID, data.status)
|
||||
}
|
||||
|
||||
|
||||
let data_route_id = data.route_id
|
||||
@@ -691,26 +667,27 @@ function confirmUpgrade(el, routeID){
|
||||
if (routeID){
|
||||
el_route = document.querySelector(`[data-number-of-route="${routeID}"]`);
|
||||
}
|
||||
el_route.scrollIntoView({
|
||||
behavior:"smooth",
|
||||
block:'start',
|
||||
inline:'start'
|
||||
});
|
||||
// el_route.scrollIntoView({
|
||||
// behavior:"smooth",
|
||||
// block:'start',
|
||||
// inline:'start'
|
||||
// });
|
||||
|
||||
let editButton = document.getElementById('edit_route_' + routeID)
|
||||
|
||||
if(url === '/routes/highlight_route/'){
|
||||
el_route.classList.add('highlight-color');
|
||||
editButton.classList.add('highlight-color')
|
||||
document.getElementById('control_frame_' + routeID).classList.remove('show')
|
||||
}
|
||||
|
||||
|
||||
for (let i = 0; i < remainsRisingCount.length; i++){
|
||||
remainsRisingCount[i].outerHTML = data.remains_route_rising_count.toString();
|
||||
remainsRisingCount[i].innerText = data.remains_route_rising_count.toString();
|
||||
}
|
||||
|
||||
for (let i = 0; i < remainsHighlightCount.length; i++){
|
||||
remainsHighlightCount[i].outerHTML = data.remains_route_highlight_count.toString();
|
||||
remainsHighlightCount[i].innerText = data.remains_route_highlight_count.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -732,6 +709,7 @@ function confirmUpgrade(el, routeID){
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
el.disabled = false
|
||||
document.querySelector(".info_profile").innerHTML = data.responseJSON.html;
|
||||
// $(el).attr('disabled', 'false')
|
||||
|
||||
@@ -973,13 +951,23 @@ function showMenu(el, event) {
|
||||
}
|
||||
}
|
||||
|
||||
function showControlFrame(el, route_id){
|
||||
function showControlFrame(el, route_id, raise_status){
|
||||
let menu = document.getElementById('control_frame_'+ route_id );
|
||||
|
||||
if(menu.classList.contains('show')){
|
||||
menu.classList.remove('show')
|
||||
} else {
|
||||
menu.classList.add('show')
|
||||
if(menu.classList.contains('show') && raise_status === 'ok'){
|
||||
document.getElementById('upd_form_' + route_id).classList.toggle('hide')
|
||||
document.getElementById('success_rising_'+ route_id).classList.toggle('show')
|
||||
if(el.classList.contains('close_success_rising')){
|
||||
menu.classList.remove('show')
|
||||
}
|
||||
} else if(menu.classList.contains('show') && el.id === 'raise_route' || el.classList.contains('close_success_rising')) {
|
||||
menu.classList.remove('show')
|
||||
if(el.classList.contains('close_success_rising')){
|
||||
document.getElementById('upd_form_' + route_id).classList.toggle('hide')
|
||||
document.getElementById('success_rising_'+ route_id).classList.toggle('show')
|
||||
}
|
||||
} else{
|
||||
menu.classList.add('show')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,14 @@
|
||||
class="control_frame"
|
||||
id="control_frame_{{ route.id }}"
|
||||
>
|
||||
<form method="post">
|
||||
<div class="success_rising" id="success_rising_{{ route.id }}">
|
||||
<div class="success_rising_text">
|
||||
{% trans "Объявление поднято!" %}
|
||||
</div>
|
||||
<button class="close_success_rising" onclick="showControlFrame(this, {{ route.id }})">{% trans "Закрыть" %}</button>
|
||||
</div>
|
||||
|
||||
<form class="upd_form" id="upd_form_{{ route.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="checkbox_wrapper">
|
||||
@@ -62,19 +69,24 @@
|
||||
name="route_option"
|
||||
data-routeid="{{ route.id }}"
|
||||
class="custom-checkbox round"
|
||||
|
||||
{% if remains_route_rising_count == 0%}
|
||||
disabled
|
||||
{% endif %}
|
||||
id="raise_route_{{ route.id }}">
|
||||
<label for="raise_route_{{ route.id }}" class="route_label">
|
||||
<div class="label_text">{% trans "Поднять объявление" %}</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="sub_label_text">{% trans "Осталось поднятий " %} <span id="remains_route_rising_count">{% if form.data.remains_route_rising_count %}{{ form.data.remains_route_rising_count }}{% else %}{{ remains_route_rising_count }}{% endif %}</span></div>
|
||||
<div class="sub_label_text">{% trans "Осталось поднятий " %} <span id="remains_route_rising_count">{{ remains_route_rising_count }}</span></div>
|
||||
|
||||
<div class="checkbox_wrapper">
|
||||
<input type="radio"
|
||||
name="route_option"
|
||||
data-routeid="{{ route.id }}"
|
||||
class="custom-checkbox round"
|
||||
{% if remains_route_highlight_count == 0%}
|
||||
disabled
|
||||
{% endif %}
|
||||
{# checked="checked"#}
|
||||
id="highlight_route_{{ route.id }}">
|
||||
<label for="highlight_route_{{ route.id }}" class="route_label">
|
||||
@@ -83,7 +95,10 @@
|
||||
</div>
|
||||
<div class="sub_label_text">{% trans "Осталось выделений " %}<span id="remains_route_highlight_count">{{ remains_route_highlight_count }}</span></div>
|
||||
|
||||
<button onclick="confirmUpgrade(this,{{ route.id }} )" id="send_upgrade"> {% trans "Подтвердить" %}</button>
|
||||
<button
|
||||
onclick="confirmUpgrade(this,{{ route.id }} )"
|
||||
id="send_upgrade"
|
||||
class="send_upgrade_{{ route.id }}">{% trans "Подтвердить" %}</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user