Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -1762,6 +1762,10 @@
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.dropdown-content-lang{
|
||||
z-index: 1 ;
|
||||
}
|
||||
|
||||
.menu_buttons.right.open .handler_menu{
|
||||
background: #FFFFFF;
|
||||
color: #000000;
|
||||
|
||||
@@ -1322,6 +1322,7 @@
|
||||
padding-left: 35px;
|
||||
padding-right: 35px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1384,6 +1385,9 @@
|
||||
.container_inf_about_moving{
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: #F8F8F8;
|
||||
padding: 5px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -688,12 +688,16 @@ header .header-second {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.carrier-card.highlight-color{
|
||||
background: linear-gradient(90deg, #FBED96 0%, #ABECD6 100%);
|
||||
}
|
||||
|
||||
.control_frame{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
width: 282px;
|
||||
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;
|
||||
@@ -780,6 +784,7 @@ span.btn_profile_name {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
z-index: 1;
|
||||
|
||||
}
|
||||
|
||||
@@ -2064,6 +2069,10 @@ button#raise_route {
|
||||
background: #E6E6E6;
|
||||
|
||||
}
|
||||
|
||||
.edit_route.highlight-color{
|
||||
background: #F8F8F8;
|
||||
}
|
||||
.edit_route.hide{
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -616,18 +616,19 @@ 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);
|
||||
// let remainsRisingCount = parseInt(document.getElementById('remains_route_rising_count').innerText);
|
||||
// let remainsHighlightCount = parseInt(document.getElementById('remains_route_highlight_count').innerText);
|
||||
|
||||
let form = el.form
|
||||
let formData = new FormData(form);
|
||||
formData.set('route_id', routeID)
|
||||
formData.set('remainsRisingCount', remainsRisingCount)
|
||||
formData.set('remainsHighlightCount', remainsHighlightCount)
|
||||
// formData.set('remainsRisingCount', remainsRisingCount)
|
||||
// formData.set('remainsHighlightCount', remainsHighlightCount)
|
||||
let url = '/routes/'
|
||||
// let checkboxes = document.querySelectorAll('input[name="route_option"]');
|
||||
let checkboxes = document.querySelectorAll('input[name="route_option"][data-routeid="' + routeID + '"]');
|
||||
|
||||
let remainsRisingCount = document.querySelectorAll('#remains_route_rising_count')
|
||||
let remainsHighlightCount = document.querySelectorAll('#remains_route_highlight_count')
|
||||
|
||||
for (let i = 0; i < checkboxes.length; i++) {
|
||||
|
||||
@@ -651,11 +652,14 @@ function confirmUpgrade(el, routeID){
|
||||
data: formData,
|
||||
success: function(data){
|
||||
|
||||
if(url === '/routes/raise_route/' && remainsRisingCount > 0 ){
|
||||
remainsRisingCount -= 1;
|
||||
} else if(url === '/routes/highlight_route/' && remainsHighlightCount > 0){
|
||||
remainsHighlightCount -= 1;
|
||||
}
|
||||
// $('#remains_route_rising_count').append(data.remains_route_rising_count)
|
||||
// $('#remains_route_highlight_count').append(data.remains_route_highlight_count)
|
||||
|
||||
// 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++) {
|
||||
@@ -667,17 +671,22 @@ function confirmUpgrade(el, routeID){
|
||||
// }
|
||||
// }
|
||||
|
||||
document.getElementById('remains_route_rising_count').innerText = remainsRisingCount.toString();
|
||||
document.getElementById('remains_route_highlight_count').innerText = remainsHighlightCount;
|
||||
|
||||
let data_route_id = data.route_id
|
||||
|
||||
|
||||
|
||||
// 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(!data.status){
|
||||
// document.querySelector('[data-number-of-route="' + routeID + '"]').innerHTML = data.html
|
||||
// }
|
||||
|
||||
|
||||
let data_route_id = data.route_id
|
||||
let el_route = document.querySelector(`[data-number-of-route="${data_route_id}"]`);
|
||||
if (routeID){
|
||||
el_route = document.querySelector(`[data-number-of-route="${routeID}"]`);
|
||||
@@ -688,6 +697,25 @@ function confirmUpgrade(el, routeID){
|
||||
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')
|
||||
}
|
||||
|
||||
|
||||
for (let i = 0; i < remainsRisingCount.length; i++){
|
||||
remainsRisingCount[i].outerHTML = data.remains_route_rising_count.toString();
|
||||
}
|
||||
|
||||
for (let i = 0; i < remainsHighlightCount.length; i++){
|
||||
remainsHighlightCount[i].outerHTML = data.remains_route_highlight_count.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -135,4 +135,7 @@
|
||||
</div>
|
||||
|
||||
<div class="clear_both"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
<div class="line_f_header"></div>
|
||||
@@ -1,11 +1,11 @@
|
||||
<title>{{ page.get_title }}</title>
|
||||
{#<title>{{ page.get_title }}</title>#}
|
||||
|
||||
{% if page.get_description %}
|
||||
<meta name="description" content="{{ page.get_description }}"/>
|
||||
{% endif %}
|
||||
{#{% if page.get_description %}#}
|
||||
{# <meta name="description" content="{{ page.get_description }}"/>#}
|
||||
{#{% endif %}#}
|
||||
|
||||
{% if page.seo_keywords %}
|
||||
<meta name="keywords" content="{{ page.seo_keywords }}"/>
|
||||
{% elif page.get_description %}
|
||||
<meta name="keywords" content="{{ page.get_description }}"/>
|
||||
{% endif %}
|
||||
{#{% if page.seo_keywords %}#}
|
||||
{# <meta name="keywords" content="{{ page.seo_keywords }}"/>#}
|
||||
{#{% elif page.get_description %}#}
|
||||
{# <meta name="keywords" content="{{ page.get_description }}"/>#}
|
||||
{#{% endif %}#}
|
||||
@@ -48,8 +48,8 @@
|
||||
gtag('config', 'G-2WW2PTG5BM');
|
||||
</script>
|
||||
|
||||
</header>
|
||||
<div class="line_f_header"></div>
|
||||
{# </header>#}
|
||||
{#<div class="line_f_header"></div>#}
|
||||
|
||||
|
||||
<title>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
{% load i18n %}
|
||||
|
||||
|
||||
<div class="carrier-card"{% if route.highlight_color %} style="border: 5px solid {{ route.highlight_color }};"{% endif %} data-number-of-route="{{ route.id }}">
|
||||
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
|
||||
{#<div class="carrier-card"{% if route.highlight_color %} style="border: 5px solid {{ route.highlight_color }};"{% endif %} data-number-of-route="{{ route.id }}">#}
|
||||
<div class="left-part-carrier-card">
|
||||
{# <div class="first-line-card-carrier">#}
|
||||
{# <div class="carrier-title">#}
|
||||
@@ -67,9 +68,7 @@
|
||||
<div class="label_text">{% trans "Поднять объявление" %}</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="sub_label_text">{% trans "Осталось поднятий " %} <span
|
||||
id="remains_route_rising_count"
|
||||
>{% if form.data.remainsRisingCount %}{{ form.data.remainsRisingCount }}{% else %}{{ remains_route_rising_count }}{% endif %}</span></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="checkbox_wrapper">
|
||||
<input type="radio"
|
||||
@@ -148,7 +147,7 @@
|
||||
<div class="button_remove_route">
|
||||
<button
|
||||
onclick="editRoute({{ route.id }})"
|
||||
class="edit_route"
|
||||
class="edit_route {% if route.highlight_color %} highlight-color {% endif %}"
|
||||
id="edit_route_{{ route.id }}">
|
||||
{% translate "Редактировать" %}
|
||||
</button>
|
||||
|
||||
@@ -176,7 +176,8 @@
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if not user.is_authenticated and show_contacts_allow %}
|
||||
{% if not user.is_authenticated %}
|
||||
{# {% if not user.is_authenticated and show_contacts_allow %}#}
|
||||
<div class="show_contact_wrapper">
|
||||
<a class="open_inf_carrier" href='{% url "login_profile" %}'>
|
||||
{% translate "Открыть контакт"%}
|
||||
|
||||
Reference in New Issue
Block a user