1.1.4 update rising and highlight my_routes
This commit is contained in:
@@ -1322,6 +1322,7 @@
|
|||||||
padding-left: 35px;
|
padding-left: 35px;
|
||||||
padding-right: 35px;
|
padding-right: 35px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1384,6 +1385,9 @@
|
|||||||
.container_inf_about_moving{
|
.container_inf_about_moving{
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
background: #F8F8F8;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -688,6 +688,10 @@ header .header-second {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.carrier-card.highlight-color{
|
||||||
|
background: linear-gradient(90deg, #FBED96 0%, #ABECD6 100%);
|
||||||
|
}
|
||||||
|
|
||||||
.control_frame{
|
.control_frame{
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -2065,6 +2069,10 @@ button#raise_route {
|
|||||||
background: #E6E6E6;
|
background: #E6E6E6;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit_route.highlight-color{
|
||||||
|
background: #F8F8F8;
|
||||||
|
}
|
||||||
.edit_route.hide{
|
.edit_route.hide{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -671,27 +671,22 @@ function confirmUpgrade(el, routeID){
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// document.getElementById('remains_route_rising_count').outerHTML = data.remains_route_rising_count.toString();
|
// 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();
|
// document.getElementById('remains_route_highlight_count').outerHTML = data.remains_route_highlight_count.toString();
|
||||||
|
|
||||||
let data_route_id = data.route_id
|
|
||||||
// location.href = '/profile'
|
// location.href = '/profile'
|
||||||
|
|
||||||
if(!data.status){
|
// if(!data.status){
|
||||||
document.querySelector('[data-number-of-route="' + routeID + '"]').innerHTML = data.html
|
// 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}"]`);
|
let el_route = document.querySelector(`[data-number-of-route="${data_route_id}"]`);
|
||||||
if (routeID){
|
if (routeID){
|
||||||
el_route = document.querySelector(`[data-number-of-route="${routeID}"]`);
|
el_route = document.querySelector(`[data-number-of-route="${routeID}"]`);
|
||||||
@@ -702,6 +697,25 @@ function confirmUpgrade(el, routeID){
|
|||||||
inline:'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')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
{% load i18n %}
|
{% 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="left-part-carrier-card">
|
||||||
{# <div class="first-line-card-carrier">#}
|
{# <div class="first-line-card-carrier">#}
|
||||||
{# <div class="carrier-title">#}
|
{# <div class="carrier-title">#}
|
||||||
@@ -146,7 +147,7 @@
|
|||||||
<div class="button_remove_route">
|
<div class="button_remove_route">
|
||||||
<button
|
<button
|
||||||
onclick="editRoute({{ route.id }})"
|
onclick="editRoute({{ route.id }})"
|
||||||
class="edit_route"
|
class="edit_route {% if route.highlight_color %} highlight-color {% endif %}"
|
||||||
id="edit_route_{{ route.id }}">
|
id="edit_route_{{ route.id }}">
|
||||||
{% translate "Редактировать" %}
|
{% translate "Редактировать" %}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user