This commit is contained in:
SBD
2023-11-25 12:48:15 +03:00
parent 5081b6ce3e
commit 0aae04eca8
5 changed files with 47 additions and 12 deletions

View File

@@ -740,14 +740,19 @@
/*padding: 20px;*/
margin-bottom: 5px;
border-radius: 3px;
position: relative;
}
.name_ticket > span{
padding: 10px;
font-size: 16px;
display: block;
overflow: hidden;
text-overflow: ellipsis;
position: absolute;
left: 0;
text-wrap: nowrap;
overflow: hidden;
width: calc(100% - 18px);
}
.insert_users{
@@ -2605,10 +2610,10 @@
.menu_profile{
width: 320px;
text-align: -webkit-center;
padding: 14px 0;
padding: 0;
overflow-y: auto;
height: calc(100vh - 120px);
max-height: 667px;
max-height: 697px;
background: #F8F8F8;
}
@@ -2637,7 +2642,16 @@
/*font-size: 12px;*/
line-height: 13px;
}
.menu_profile>div>.logout{
height: 100%;
top: 0;
left: 0;
}
.logout_span{
position: absolute;
top: 20px;
left: 42%;
}
/*left panel of users*/
.menu_buttons.left.close .container_block_list_of_users{

View File

@@ -1181,6 +1181,7 @@ h2.title_new_route{
position: unset;
height: unset;
width: 274px;
padding-top: 24px;
}
/*.menu_profile>div>a {*/

View File

@@ -22,7 +22,9 @@ function select_tab_profile (el,url,owner_type=null) {
} else if (url.includes('get_routes')){
confirm_url = `/routes/${url}/`
}
document.querySelector(".info_profile").innerHTML = '<img src="/static/img/svg/loader.svg" style="height: 30px;position: absolute;top: 50%;left: 50%;"/>'
if (window.location.href.includes("profile")){
document.querySelector(".info_profile").innerHTML = '<img src="/static/img/svg/loader.svg" style="height: 30px;position: absolute;top: 50%;left: 50%;"/>'
}
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: confirm_url,
@@ -706,7 +708,7 @@ function open_overlay (curtain) {
overlay.classList.toggle('hidden')
}
} else {
if (document.querySelector(".menu_buttons.left.open") && curtain.classList.contains('open')){
if (!document.querySelector(".menu_buttons.left.first.open") && document.querySelector(".menu_buttons.left.open") && curtain.classList.contains('open')){
} else {
overlay.classList.toggle("show")
@@ -716,6 +718,7 @@ function open_overlay (curtain) {
}
function toggle_cut_width_curtain (el) {
let parent = el.parentNode
parent.classList.toggle('open')
@@ -763,11 +766,13 @@ function close_open_curtain (){
last_open_curtain.classList.toggle('open')
last_open_curtain.classList.toggle('close')
open_overlay(last_open_curtain)
toggle_cut_width_curtain(last_open_curtain)
} else if (window.location.href.includes('profile')) {
let curtain = document.querySelector('.menu_buttons.right')
curtain.classList.toggle('open')
curtain.classList.toggle('close')
open_overlay(curtain)
toggle_cut_width_curtain(curtain)
}
} else {
@@ -775,8 +780,19 @@ function close_open_curtain (){
curtain.classList.toggle("open")
curtain.classList.toggle("close")
open_overlay(curtain)
toggle_cut_width_curtain(curtain)
}
}
function reAdressClickOnbackrground (event,el) {
// let overlay = document.querySelector(".block_overlay")
let element_click = document.elementFromPoint(event.pageX, event.pageY)
if (!element_click || element_click === el){
element_click = document.querySelector(".block_overlay")
}
element_click.click()
}
// function show_header_list () {

View File

@@ -56,9 +56,9 @@
<div class="block_overlay {% if page_type == 'profile' %}show{% elif page_type == 'routes' %} routes n_profile hidden{% else %}hidden n_profile{% endif %}" onclick="close_open_curtain()"></div>
<div class="wrapper_main">
{% include 'blocks/b_header.html' %}
{% include 'blocks/b_header.html' %}s
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right">
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right" onclick="reAdressClickOnbackrground(event,this)">
<div class="menu_buttons curtain right {% if page_type == 'profile' %}open{% else %} n_profile close{% endif %}" data-name="<img style='width: 25px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'>">
{% include "blocks/profile/b_buttons_menu_profile.html" %}

View File

@@ -1,6 +1,6 @@
<div
{% if dom_id %}id="{{ dom_id }}"{% endif %}
{% if ajax_url %}onclick="select_tab_profile(this,'{{ ajax_url }}'{% if owner_type %},'{{ owner_type }}'{% endif %})"{% endif %}
{% if ajax_url and page_type == 'profile' %}onclick="select_tab_profile(this,'{{ ajax_url }}'{% if owner_type %},'{{ owner_type }}'{% endif %})"{% endif %}
{% if page_name == sel_page_name %}
class="selected"
{% endif %} >
@@ -9,13 +9,16 @@
{% if page_type and page_type == 'profile' or not sel_page_name %}
{% if sel_page_name == 'logout' %}
<a href="/profile/logout/" class="text_btn_profile">
<a href="/profile/logout/" class="text_btn_profile logout">
<span class="logout_span">
{% else %}
<span class="text_btn_profile">
{% endif %}
{% else %}
{% if sel_page_name != 'logoout' %}
{% if sel_page_name == 'logout' %}
<a href="/profile/logout/" class="text_btn_profile logout">
<span class="logout_span">
{% elif sel_page_name != 'logoout' %}
<a href="{% url "profile_page" sel_page_name %}" class="text_btn_profile">
{% endif %}
{% endif %}
@@ -29,6 +32,7 @@
{% endif %}
{% if page_type and page_type == 'profile' or not sel_page_name %}
{% if sel_page_name == 'logout' %}
</span>
</a>
{% else %}
</span>