0.8.392
This commit is contained in:
@@ -402,7 +402,9 @@ def support_show_chat_by_ticket_ajax(request):
|
||||
'ticket': ticket,
|
||||
'messages': msgs,
|
||||
'cur_receiver': cur_receiver,
|
||||
'new_msg_allow': new_msg_allow
|
||||
'new_msg_allow': new_msg_allow,
|
||||
'staff': request.user.is_staff,
|
||||
'mobile': data['mobile']
|
||||
}
|
||||
Dict.update(get_ticketsDict_for_staff(request.user))
|
||||
|
||||
|
||||
@@ -608,16 +608,18 @@
|
||||
}
|
||||
.cut_width_f_curtain.n_profile.left{
|
||||
position: fixed;
|
||||
min-width: 1280px;
|
||||
/*min-width: 1280px;*/
|
||||
}
|
||||
|
||||
.cut_width_f_curtain.n_profile.close{
|
||||
z-index: -1;
|
||||
}
|
||||
/*.cut_width_f_curtain.n_profile.close{*/
|
||||
/* display: none;*/
|
||||
/* min-width: 1280px;*/
|
||||
/*}*/
|
||||
|
||||
.cut_width_f_curtain.n_profile.open{
|
||||
z-index: 101;
|
||||
}
|
||||
/*.cut_width_f_curtain.n_profile.open{*/
|
||||
/* display: block;*/
|
||||
/* min-width: 1280px;*/
|
||||
/*}*/
|
||||
|
||||
|
||||
.menu_buttons{
|
||||
@@ -788,6 +790,12 @@
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.support .menu_buttons.left.open.margin{
|
||||
margin: 0;
|
||||
}
|
||||
.block_overlay.show{
|
||||
display: block;
|
||||
}
|
||||
#customer>a, #mover>a{
|
||||
left: 5%;
|
||||
}
|
||||
|
||||
@@ -2360,15 +2360,16 @@
|
||||
|
||||
.cut_width_f_curtain.n_profile.right{
|
||||
position: fixed;
|
||||
min-width: 1280px;
|
||||
}
|
||||
|
||||
.cut_width_f_curtain.n_profile.close{
|
||||
z-index: -1;
|
||||
display: none;
|
||||
min-width: 1280px;
|
||||
}
|
||||
|
||||
.cut_width_f_curtain.n_profile.open{
|
||||
z-index: 101;
|
||||
display: block;
|
||||
min-width: 1280px;
|
||||
}
|
||||
|
||||
|
||||
@@ -2405,6 +2406,7 @@
|
||||
max-height: calc(100vh - 125px);
|
||||
overflow: unset;
|
||||
left: -19px;
|
||||
top: 0;
|
||||
}
|
||||
.menu_buttons.curtain.left.close.chat .container_block_list_of_users {
|
||||
position: relative;
|
||||
|
||||
@@ -62,10 +62,10 @@ function select_tab_profile (el,url,owner_type=null) {
|
||||
middleWareJS()
|
||||
let user_type = getInfoAboutUser()
|
||||
if (user_type === 'mobile') {
|
||||
closeCurtain()
|
||||
open_curtain_w_btn_profile()
|
||||
} else {
|
||||
if (!window.location.href.includes('profile')){
|
||||
closeCurtain()
|
||||
open_curtain_w_btn_profile()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -458,10 +458,9 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
|
||||
}
|
||||
let user_type = getInfoAboutUser()
|
||||
if (user_type === 'mobile' || user_type === 'laptop') {
|
||||
closeCurtain('left')
|
||||
} else if (!window.location.href.includes('profile')){
|
||||
closeCurtain()
|
||||
open_curtain_w_contacts()
|
||||
}
|
||||
data['mobile'] = getInfoAboutUser() === 'mobile' || getInfoAboutUser() === 'laptop'
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/messages/' + url,
|
||||
@@ -477,6 +476,7 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
|
||||
if (loader){
|
||||
loader.classList.toggle("show")
|
||||
}
|
||||
// let left_curtain = document.querySelector('.curtain.left')
|
||||
document.querySelector(".info_profile").innerHTML = data.html;
|
||||
document.querySelector(".enter-message-inp").focus()
|
||||
|
||||
@@ -492,7 +492,6 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
|
||||
|
||||
|
||||
|
||||
let curt_f_close = getCurtainWIncreaceZindex(document.querySelectorAll('.curtain'))
|
||||
|
||||
|
||||
},
|
||||
@@ -660,321 +659,434 @@ function send_subscribe (id){
|
||||
});
|
||||
}
|
||||
|
||||
var last_open_curtain = null
|
||||
|
||||
function show_header_list () {
|
||||
let el = document.querySelector(".menu_profile_btn")
|
||||
if (el) {
|
||||
el.classList.toggle("show")
|
||||
closeCurtain()
|
||||
}
|
||||
function open_curtain_w_btn_profile () {
|
||||
let curtain = document.querySelector(".menu_buttons.right")
|
||||
curtain.classList.toggle("open")
|
||||
curtain.classList.toggle("close")
|
||||
toggle_cut_width_curtain(curtain)
|
||||
open_overlay(curtain)
|
||||
last_open_curtain = curtain
|
||||
set_curtain_z_index(curtain)
|
||||
close_first_curt(curtain)
|
||||
}
|
||||
|
||||
function closeCurtain (left,right) {
|
||||
if (left){
|
||||
let left = document.querySelector(".curtain.left")
|
||||
open_curtain(left,null,null,'close')
|
||||
} else if (right){
|
||||
let right = document.querySelector(".curtain.right")
|
||||
open_curtain(null,right,null,'close')
|
||||
} else {
|
||||
let curtain = getOpenCurtain()
|
||||
if (curtain) {
|
||||
open_curtain(null, null, null, 'close')
|
||||
}
|
||||
function open_curtain_w_contacts () {
|
||||
let curtain = document.querySelector('.menu_buttons.left')
|
||||
open_overlay(curtain)
|
||||
curtain.classList.toggle('open')
|
||||
curtain.classList.toggle('close')
|
||||
if (curtain.classList.contains('first')){
|
||||
curtain.classList.remove('first')
|
||||
curtain.classList.toggle('open')
|
||||
curtain.classList.toggle('close')
|
||||
}
|
||||
|
||||
set_curtain_z_index(curtain)
|
||||
last_open_curtain = curtain
|
||||
close_first_curt(curtain)
|
||||
}
|
||||
|
||||
|
||||
function open_curtain (left=null,right=null,overlay=null,close=null){
|
||||
let page_profile = true
|
||||
let curtain_name = ''
|
||||
let curtain = ''
|
||||
let left_curtain = document.querySelector(".menu_buttons.left")
|
||||
let right_curtain = document.querySelector(".menu_buttons.right")
|
||||
let container_curtain = document.querySelector(".cut_width_f_curtain")
|
||||
if (left || right){
|
||||
if (left){
|
||||
if (left_curtain){
|
||||
curtain = left_curtain
|
||||
newCurtainZIndex(curtain)
|
||||
if (right_curtain) {
|
||||
right_curtain.style.zIndex = '99'
|
||||
curtain_name = curtain.dataset['name']
|
||||
}
|
||||
}
|
||||
|
||||
} else if (right) {
|
||||
if (right_curtain){
|
||||
curtain = right_curtain
|
||||
newCurtainZIndex(curtain)
|
||||
if (left_curtain) {
|
||||
left_curtain.style.zIndex = '99'
|
||||
curtain_name = curtain.dataset['name']
|
||||
}
|
||||
}
|
||||
function open_overlay (curtain) {
|
||||
let overlay = document.querySelector('.block_overlay')
|
||||
if (curtain.classList.contains("left")){
|
||||
if (!curtain.classList.contains('close') && overlay.classList.contains('show')){
|
||||
overlay.classList.toggle("show")
|
||||
overlay.classList.toggle("hidden")
|
||||
} else if (curtain.classList.contains('close') && overlay.classList.contains('show')){
|
||||
overlay.classList.remove("show")
|
||||
overlay.classList.add("hidden")
|
||||
} else if (!curtain.classList.contains('open') && overlay.classList.contains('hidden')){
|
||||
overlay.classList.add('show')
|
||||
overlay.classList.remove('hidden')
|
||||
} else if (curtain.classList.contains('open') && overlay.classList.contains('hidden') && window.location.href.includes('routes')) {
|
||||
overlay.classList.toggle('show')
|
||||
overlay.classList.toggle('hidden')
|
||||
}
|
||||
} else {
|
||||
curtain = getOpenCurtain()
|
||||
curtain_name = getInfoCurtain(null,null,'name')['name']
|
||||
overlay.classList.toggle("show")
|
||||
overlay.classList.toggle("hidden")
|
||||
}
|
||||
if (!curtain){
|
||||
curtain = getCurtainWIncreaceZindex(left_curtain,right_curtain)
|
||||
}
|
||||
let body = document.querySelector('body')
|
||||
if (curtain[0]){
|
||||
let type_curt = getTypeOfData(curtain)
|
||||
if (type_curt === 'object'){
|
||||
curtain = curtain[0]
|
||||
}
|
||||
}
|
||||
if (close){
|
||||
// curtain = getOpenCurtain()
|
||||
turnOffFirst(curtain)
|
||||
let handler_text = curtain.querySelector('.text_f_curtain')
|
||||
|
||||
handler_text.innerHTML = curtain_name
|
||||
}
|
||||
|
||||
let user_type = getInfoAboutUser()
|
||||
if (user_type === 'mobile' || user_type === 'laptop') {
|
||||
curtain.classList.remove("open")
|
||||
curtain.classList.add("close")
|
||||
container_curtain.classList.remove("open")
|
||||
container_curtain.classList.add("close")
|
||||
function toggle_cut_width_curtain (el) {
|
||||
let parent = el.parentNode
|
||||
parent.classList.toggle('open')
|
||||
parent.classList.toggle('close')
|
||||
}
|
||||
|
||||
closeOverlay()
|
||||
} else if (!window.location.href.includes('profile')){
|
||||
//
|
||||
} else {
|
||||
curtain.classList.remove("open")
|
||||
curtain.classList.add("close")
|
||||
container_curtain.classList.remove("open")
|
||||
container_curtain.classList.add("close")
|
||||
}
|
||||
} else if (curtain) {
|
||||
|
||||
if (curtain.classList.contains('first')){
|
||||
turnOffFirst(curtain)
|
||||
let overlay = document.querySelector('.block_overlay.show')
|
||||
if (!overlay){
|
||||
let overlay_clear = document.querySelector(".block_overlay")
|
||||
overlay_clear.classList.toggle('show')
|
||||
overlay_clear.classList.toggle('hidden')
|
||||
function close_first_curt (curtain) {
|
||||
let curtains = document.querySelectorAll(".curtain.open")
|
||||
let i = 0
|
||||
if (curtains.length >= 2){
|
||||
curtains.forEach(function (){
|
||||
let cur_el = curtains[i]
|
||||
if (cur_el !== curtain){
|
||||
cur_el.classList.toggle('open')
|
||||
cur_el.classList.toggle('close')
|
||||
|
||||
}
|
||||
curtainMove(curtain,container_curtain,curtain_name,body)
|
||||
curtain.classList.add("open")
|
||||
curtain.classList.remove("close")
|
||||
} else {
|
||||
curtainMove(curtain,container_curtain,curtain_name,body)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function curtainMove (curtain,container_curtain,curtain_name,body){
|
||||
let user_type = getInfoAboutUser()
|
||||
// if (user_type === 'mobile' || !window.location.host.includes('profile') || user_type === 'laptop' )
|
||||
// artem заменил host на href ибо в host хранится имя хоста, а не путь в котором мы ищем profile
|
||||
if (user_type === 'mobile' || !window.location.href.includes('profile') || user_type === 'laptop' )
|
||||
{
|
||||
curtain.classList.toggle("open")
|
||||
curtain.classList.toggle("close")
|
||||
|
||||
// newCurtainZIndex()
|
||||
let curtain_check = getOpenCurtain()
|
||||
if (curtain_check.length > 1){
|
||||
let curtain_old = getCurtainWIncreaceZindex(curtain_check,'decreace')
|
||||
if (curtain_old){
|
||||
if (curtain_old['increace']){
|
||||
curtain_old = curtain_old['increace']
|
||||
}
|
||||
}
|
||||
curtain_old.classList.toggle("close")
|
||||
curtain_old.classList.toggle("open")
|
||||
|
||||
}
|
||||
if (curtain_check.length > 0){
|
||||
let overlay = document.querySelector('.block_overlay.show')
|
||||
if (!overlay){
|
||||
let overlay_clear = document.querySelector(".block_overlay")
|
||||
overlay_clear.classList.toggle('show')
|
||||
overlay_clear.classList.toggle('hidden')
|
||||
}
|
||||
} else {
|
||||
|
||||
closeOverlay()
|
||||
|
||||
}
|
||||
} else {
|
||||
if (!window.location.href.includes('profile')){
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let handler_text = curtain.querySelector('.text_f_curtain')
|
||||
// if (curtain.classList.contains('open')){
|
||||
// handler_text.innerHTML = 'Закрыть'
|
||||
// handler_text.style.fontSize = '13px'
|
||||
// } else {
|
||||
let name = ''
|
||||
if (curtain_name){
|
||||
name = curtain_name
|
||||
} else {
|
||||
name = curtain.dataset['name']
|
||||
}
|
||||
|
||||
handler_text.innerHTML = name
|
||||
handler_text.style.fontSize = '13px'
|
||||
// }
|
||||
|
||||
if (!curtain.classList.contains('open')){
|
||||
body.style.overflowY = ''
|
||||
} else {
|
||||
body.style.overflowY = 'hidden'
|
||||
}
|
||||
container_curtain.classList.toggle("close")
|
||||
container_curtain.classList.toggle("open")
|
||||
}
|
||||
|
||||
function check_ev_f_cut_width_f_curtain (event) {
|
||||
let el = event.srcElement
|
||||
if (!el.attributes.hasOwnProperty('onclick')){
|
||||
open_curtain()
|
||||
} else {
|
||||
el.click()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function turnOffFirst (el) {
|
||||
if (el.classList.contains('first')){
|
||||
el.classList.remove('first')
|
||||
i++
|
||||
})
|
||||
open_overlay(curtain)
|
||||
}
|
||||
}
|
||||
|
||||
function closeOverlay () {
|
||||
let curt = getOpenCurtain()
|
||||
if (curt.length > 1){
|
||||
// nothing to do
|
||||
} else {
|
||||
let overlay = document.querySelector(".block_overlay")
|
||||
overlay.classList.add('hidden')
|
||||
overlay.classList.remove('show')
|
||||
}
|
||||
}
|
||||
function set_curtain_z_index (curtain) {
|
||||
|
||||
function newCurtainZIndex (curtain) {
|
||||
let cur_curtain = ''
|
||||
if (curtain){
|
||||
cur_curtain = curtain
|
||||
} else {
|
||||
cur_curtain = getOpenCurtain()[0]
|
||||
}
|
||||
if (cur_curtain){
|
||||
cur_curtain.style.zIndex = '101'
|
||||
let curtain_f_delete = forloopForCurtains(cur_curtain)
|
||||
if (curtain_f_delete){
|
||||
curtain_f_delete.style.zIndex = '99'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function forloopForCurtains (cur_curtain) {
|
||||
let curtains = document.querySelectorAll('.curtain')
|
||||
let curtain_f_delete = null
|
||||
let curtains = document.querySelectorAll(".curtain")
|
||||
let i = 0
|
||||
curtains.forEach(function (){
|
||||
let el = curtains[i]
|
||||
if (!el === cur_curtain){
|
||||
curtain_f_delete = el
|
||||
let cur_el = curtains[i]
|
||||
if (cur_el === curtain){
|
||||
cur_el.style.zIndex = 101
|
||||
} else {
|
||||
cur_el.style.zIndex = 99
|
||||
}
|
||||
i++
|
||||
})
|
||||
return curtain_f_delete
|
||||
|
||||
}
|
||||
|
||||
function getInfoCurtain (curtain,zIndex,name) {
|
||||
let data = {}
|
||||
let curtain_f_w = null
|
||||
if (curtain){
|
||||
let type_curt = getTypeOfData(curtain)
|
||||
if (curtain[0] && type_curt === 'object'){
|
||||
curtain_f_w = curtain[0]
|
||||
} else {
|
||||
curtain_f_w = curtain
|
||||
function close_open_curtain (){
|
||||
let curtains = document.querySelectorAll('.curtain.open')
|
||||
if (curtains.length >= 2){
|
||||
if (last_open_curtain){
|
||||
last_open_curtain.classList.toggle('open')
|
||||
last_open_curtain.classList.toggle('close')
|
||||
open_overlay(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)
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
curtain_f_w = getOpenCurtain()
|
||||
let type_curt = getTypeOfData(curtain_f_w)
|
||||
if (curtain_f_w[0]){
|
||||
if (type_curt === 'object'){
|
||||
curtain_f_w = curtain_f_w[0]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (name){
|
||||
let dataset = curtain_f_w.dataset
|
||||
let name = ''
|
||||
if (dataset){
|
||||
name = dataset['name']
|
||||
data['name'] = name
|
||||
}
|
||||
}
|
||||
if (zIndex){
|
||||
if (curtain_f_w.style.zIndex){
|
||||
data['zIndex'] = curtain_f_w.style.zIndex
|
||||
} else{
|
||||
data['zIndex'] = 'z-index not finded'
|
||||
}
|
||||
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
function getOpenCurtain () {
|
||||
let curtains = document.querySelectorAll(".curtain.open")
|
||||
if (!curtains){
|
||||
curtains = document.querySelector('.curtain')
|
||||
console.log(`not finded open curtain choice first curtain named=${curtains.dataset['name']}`)
|
||||
}
|
||||
return curtains
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getCurtainWIncreaceZindex (curtains,decreace) {
|
||||
let first = getInfoCurtain(curtains[0],'zIndex')
|
||||
let second = getInfoCurtain(curtains[1],'zIndex')
|
||||
let el_increace = ''
|
||||
if (first['zIndex'] > second['zIndex']){
|
||||
el_increace = first
|
||||
if (decreace){
|
||||
return {
|
||||
'increace': curtains[0],
|
||||
'decreace': curtains[1]
|
||||
}
|
||||
} else {
|
||||
return curtains[0]
|
||||
}
|
||||
|
||||
}
|
||||
if (second['zIndex'] > first['zIndex']){
|
||||
el_increace = second
|
||||
if (decreace){
|
||||
return {
|
||||
'increace': curtains[1],
|
||||
'decreace': curtains[0]
|
||||
}
|
||||
} else {
|
||||
return curtains[1]
|
||||
}
|
||||
|
||||
let curtain = document.querySelector('.curtain.open')
|
||||
curtain.classList.toggle("open")
|
||||
curtain.classList.toggle("close")
|
||||
open_overlay(curtain)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// function show_header_list () {
|
||||
// let el = document.querySelector(".menu_profile_btn")
|
||||
// if (el) {
|
||||
// el.classList.toggle("show")
|
||||
// closeCurtain()
|
||||
// }
|
||||
// }
|
||||
|
||||
// function closeCurtain (left,right) {
|
||||
// if (left){
|
||||
// let left = document.querySelector(".curtain.left")
|
||||
// open_curtain(left,null,null,'close')
|
||||
// } else if (right){
|
||||
// let right = document.querySelector(".curtain.right")
|
||||
// open_curtain(null,right,null,'close')
|
||||
// } else {
|
||||
// let curtain = getOpenCurtain()
|
||||
// if (curtain) {
|
||||
// open_curtain(null, null, null, 'close')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// function open_curtain (left=null,right=null,overlay=null,close=null){
|
||||
// let page_profile = true
|
||||
// let curtain_name = ''
|
||||
// let curtain = ''
|
||||
// let left_curtain = document.querySelector(".menu_buttons.left")
|
||||
// let right_curtain = document.querySelector(".menu_buttons.right")
|
||||
// let container_curtain = document.querySelector(".cut_width_f_curtain")
|
||||
// if (left || right){
|
||||
// if (left){
|
||||
// if (left_curtain){
|
||||
// curtain = left_curtain
|
||||
// newCurtainZIndex(curtain)
|
||||
// if (right_curtain) {
|
||||
// right_curtain.style.zIndex = '99'
|
||||
// curtain_name = curtain.dataset['name']
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// } else if (right) {
|
||||
// if (right_curtain){
|
||||
// curtain = right_curtain
|
||||
// newCurtainZIndex(curtain)
|
||||
// if (left_curtain) {
|
||||
// left_curtain.style.zIndex = '99'
|
||||
// curtain_name = curtain.dataset['name']
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// curtain = getOpenCurtain()
|
||||
// curtain_name = getInfoCurtain(null,null,'name')['name']
|
||||
// }
|
||||
// if (!curtain){
|
||||
// curtain = getCurtainWIncreaceZindex(left_curtain,right_curtain)
|
||||
// }
|
||||
// let body = document.querySelector('body')
|
||||
// if (curtain[0]){
|
||||
// let type_curt = getTypeOfData(curtain)
|
||||
// if (type_curt === 'object'){
|
||||
// curtain = curtain[0]
|
||||
// }
|
||||
// }
|
||||
// if (close){
|
||||
// // curtain = getOpenCurtain()
|
||||
// turnOffFirst(curtain)
|
||||
// let handler_text = curtain.querySelector('.text_f_curtain')
|
||||
//
|
||||
// handler_text.innerHTML = curtain_name
|
||||
//
|
||||
// let user_type = getInfoAboutUser()
|
||||
// if (user_type === 'mobile' || user_type === 'laptop') {
|
||||
// curtain.classList.remove("open")
|
||||
// curtain.classList.add("close")
|
||||
// container_curtain.classList.remove("open")
|
||||
// container_curtain.classList.add("close")
|
||||
//
|
||||
// closeOverlay()
|
||||
// } else if (!window.location.href.includes('profile')){
|
||||
// //
|
||||
// } else {
|
||||
// curtain.classList.remove("open")
|
||||
// curtain.classList.add("close")
|
||||
// container_curtain.classList.remove("open")
|
||||
// container_curtain.classList.add("close")
|
||||
// }
|
||||
// } else if (curtain) {
|
||||
//
|
||||
// if (curtain.classList.contains('first')){
|
||||
// turnOffFirst(curtain)
|
||||
// let overlay = document.querySelector('.block_overlay.show')
|
||||
// if (!overlay){
|
||||
// let overlay_clear = document.querySelector(".block_overlay")
|
||||
// overlay_clear.classList.toggle('show')
|
||||
// overlay_clear.classList.toggle('hidden')
|
||||
//
|
||||
// }
|
||||
// curtainMove(curtain,container_curtain,curtain_name,body)
|
||||
// curtain.classList.add("open")
|
||||
// curtain.classList.remove("close")
|
||||
// } else {
|
||||
// curtainMove(curtain,container_curtain,curtain_name,body)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// function curtainMove (curtain,container_curtain,curtain_name,body){
|
||||
// let user_type = getInfoAboutUser()
|
||||
// // if (user_type === 'mobile' || !window.location.host.includes('profile') || user_type === 'laptop' )
|
||||
// // artem заменил host на href ибо в host хранится имя хоста, а не путь в котором мы ищем profile
|
||||
// if (user_type === 'mobile' || !window.location.href.includes('profile') || user_type === 'laptop' )
|
||||
// {
|
||||
// curtain.classList.toggle("open")
|
||||
// curtain.classList.toggle("close")
|
||||
//
|
||||
// // newCurtainZIndex()
|
||||
// let curtain_check = getOpenCurtain()
|
||||
// if (curtain_check.length > 1){
|
||||
// let curtain_old = getCurtainWIncreaceZindex(curtain_check,'decreace')
|
||||
// if (curtain_old){
|
||||
// if (curtain_old['increace']){
|
||||
// curtain_old = curtain_old['increace']
|
||||
// }
|
||||
// }
|
||||
// curtain_old.classList.toggle("close")
|
||||
// curtain_old.classList.toggle("open")
|
||||
//
|
||||
// }
|
||||
// if (curtain_check.length > 0){
|
||||
// let overlay = document.querySelector('.block_overlay.show')
|
||||
// if (!overlay){
|
||||
// let overlay_clear = document.querySelector(".block_overlay")
|
||||
// overlay_clear.classList.toggle('show')
|
||||
// overlay_clear.classList.toggle('hidden')
|
||||
// }
|
||||
// } else {
|
||||
//
|
||||
// closeOverlay()
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
// if (!window.location.href.includes('profile')){
|
||||
// //
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// let handler_text = curtain.querySelector('.text_f_curtain')
|
||||
// // if (curtain.classList.contains('open')){
|
||||
// // handler_text.innerHTML = 'Закрыть'
|
||||
// // handler_text.style.fontSize = '13px'
|
||||
// // } else {
|
||||
// let name = ''
|
||||
// if (curtain_name){
|
||||
// name = curtain_name
|
||||
// } else {
|
||||
// name = curtain.dataset['name']
|
||||
// }
|
||||
//
|
||||
// handler_text.innerHTML = name
|
||||
// handler_text.style.fontSize = '13px'
|
||||
// // }
|
||||
//
|
||||
// if (!curtain.classList.contains('open')){
|
||||
// body.style.overflowY = ''
|
||||
// } else {
|
||||
// body.style.overflowY = 'hidden'
|
||||
// }
|
||||
// container_curtain.classList.toggle("close")
|
||||
// container_curtain.classList.toggle("open")
|
||||
// }
|
||||
//
|
||||
// function check_ev_f_cut_width_f_curtain (event) {
|
||||
// let el = event.srcElement
|
||||
// if (!el.attributes.hasOwnProperty('onclick')){
|
||||
// open_curtain()
|
||||
// } else {
|
||||
// el.click()
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// function turnOffFirst (el) {
|
||||
// if (el.classList.contains('first')){
|
||||
// el.classList.remove('first')
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// function closeOverlay () {
|
||||
// let curt = getOpenCurtain()
|
||||
// if (curt.length > 1){
|
||||
// // nothing to do
|
||||
// } else {
|
||||
// let overlay = document.querySelector(".block_overlay")
|
||||
// overlay.classList.add('hidden')
|
||||
// overlay.classList.remove('show')
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// function newCurtainZIndex (curtain) {
|
||||
// let cur_curtain = ''
|
||||
// if (curtain){
|
||||
// cur_curtain = curtain
|
||||
// } else {
|
||||
// cur_curtain = getOpenCurtain()[0]
|
||||
// }
|
||||
// if (cur_curtain){
|
||||
// cur_curtain.style.zIndex = '101'
|
||||
// let curtain_f_delete = forloopForCurtains(cur_curtain)
|
||||
// if (curtain_f_delete){
|
||||
// curtain_f_delete.style.zIndex = '99'
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// function forloopForCurtains (cur_curtain) {
|
||||
// let curtains = document.querySelectorAll('.curtain')
|
||||
// let curtain_f_delete = null
|
||||
// let i = 0
|
||||
// curtains.forEach(function (){
|
||||
// let el = curtains[i]
|
||||
// if (!el === cur_curtain){
|
||||
// curtain_f_delete = el
|
||||
// }
|
||||
// i++
|
||||
// })
|
||||
// return curtain_f_delete
|
||||
// }
|
||||
//
|
||||
// function getInfoCurtain (curtain,zIndex,name) {
|
||||
// let data = {}
|
||||
// let curtain_f_w = null
|
||||
// if (curtain){
|
||||
// let type_curt = getTypeOfData(curtain)
|
||||
// if (curtain[0] && type_curt === 'object'){
|
||||
// curtain_f_w = curtain[0]
|
||||
// } else {
|
||||
// curtain_f_w = curtain
|
||||
// }
|
||||
//
|
||||
//
|
||||
// } else {
|
||||
// curtain_f_w = getOpenCurtain()
|
||||
// let type_curt = getTypeOfData(curtain_f_w)
|
||||
// if (curtain_f_w[0]){
|
||||
// if (type_curt === 'object'){
|
||||
// curtain_f_w = curtain_f_w[0]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (name){
|
||||
// let dataset = curtain_f_w.dataset
|
||||
// let name = ''
|
||||
// if (dataset){
|
||||
// name = dataset['name']
|
||||
// data['name'] = name
|
||||
// }
|
||||
// }
|
||||
// if (zIndex){
|
||||
// if (curtain_f_w.style.zIndex){
|
||||
// data['zIndex'] = curtain_f_w.style.zIndex
|
||||
// } else{
|
||||
// data['zIndex'] = 'z-index not finded'
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// return data
|
||||
// }
|
||||
//
|
||||
// function getOpenCurtain () {
|
||||
// let curtains = document.querySelectorAll(".curtain.open")
|
||||
// if (!curtains){
|
||||
// curtains = document.querySelector('.curtain')
|
||||
// console.log(`not finded open curtain choice first curtain named=${curtains.dataset['name']}`)
|
||||
// }
|
||||
// return curtains
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// function getCurtainWIncreaceZindex (curtains,decreace) {
|
||||
// let first = getInfoCurtain(curtains[0],'zIndex')
|
||||
// let second = getInfoCurtain(curtains[1],'zIndex')
|
||||
// let el_increace = ''
|
||||
// if (first['zIndex'] > second['zIndex']){
|
||||
// el_increace = first
|
||||
// if (decreace){
|
||||
// return {
|
||||
// 'increace': curtains[0],
|
||||
// 'decreace': curtains[1]
|
||||
// }
|
||||
// } else {
|
||||
// return curtains[0]
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (second['zIndex'] > first['zIndex']){
|
||||
// el_increace = second
|
||||
// if (decreace){
|
||||
// return {
|
||||
// 'increace': curtains[1],
|
||||
// 'decreace': curtains[0]
|
||||
// }
|
||||
// } else {
|
||||
// return curtains[1]
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
{% if user.is_authenticated %}
|
||||
{# boris changed #}
|
||||
<div class="cont_header_btn_profile">
|
||||
<div class="button_profile_header" {% if not page_type == 'profile' %}onclick="open_curtain(null,'right')"{% endif %} data-user-id="{{ user.id }}">
|
||||
<div class="button_profile_header" {% if not page_type == 'profile' %}onclick="open_curtain_w_btn_profile()"{% endif %} data-user-id="{{ user.id }}">
|
||||
{# <div class="button_profile_header" onclick="open_curtain(null,'right')" data-user-id="{{ user.id }}">#}
|
||||
|
||||
<span class="btn_profile_name">
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button_profile_header_mobile" onclick="open_curtain(null,'right')">
|
||||
<div class="button_profile_header_mobile" onclick="open_curtain_w_btn_profile()">
|
||||
<img src="/static/img/svg/userMobile.svg" alt="">
|
||||
</div>
|
||||
{# <div class="menu_profile_btn">#}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="container_block_list_of_users">
|
||||
{% include 'blocks/profile/b_list_of_users_messenger.html' %}
|
||||
</div>
|
||||
<div class="handler_menu close" onclick="open_curtain('left')">
|
||||
<div class="handler_menu close" onclick="open_curtain_w_contacts()">
|
||||
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
<div class="text_f_curtain left"><img style='width: 25px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/group.png" %}'></div>
|
||||
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
{# <h1>Техническая поддержка</h1>#}
|
||||
{# </div>#}
|
||||
<img class="loader_chat_f_sw_chats support" src="{% static "/img/svg/loader.svg" %}" alt="loader">
|
||||
{% if user.is_staff %}
|
||||
<div class="menu_buttons curtain left {% if not ticket %}open{% else %}close{% endif %} {% if name.ticket %}margin{% endif %}" data-name="<img style='width: 25px;display: block;position: relative;bottom: 2px;' src='{% static "/img/svg/group.png" %}'>">
|
||||
{% if user.is_staff or staff %}
|
||||
<div class="menu_buttons curtain left {% if mobile %}{% if not ticket %}open{% else %}close{% endif %}{% else %}open margin{% endif %}{% if name.ticket %}margin{% endif %}" data-name="<img style='width: 25px;display: block;position: relative;bottom: 2px;' src='{% static "/img/svg/group.png" %}'>">
|
||||
<div class="container_block_list_of_users">
|
||||
{% include 'blocks/profile/b_list_of_tickets_support_chat.html' %}
|
||||
</div>
|
||||
<div class="handler_menu close" onclick="open_curtain('left')">
|
||||
<div class="handler_menu close" onclick="open_curtain_w_contacts()">
|
||||
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
<div class="text_f_curtain left"><img style='width: 25px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/group.png" %}'></div>
|
||||
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
|
||||
@@ -53,16 +53,16 @@
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body {% if page_type == 'routes' %}onscroll="scroll_ev(event,this)" {% endif %}>
|
||||
<div class="block_overlay {% if page_type == 'profile' %}show{% elif page_type == 'routes' %} routes n_profile{% else %}hidden n_profile{% endif %}" onclick="open_curtain()"></div>
|
||||
<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' %}
|
||||
|
||||
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right" onclick="check_ev_f_cut_width_f_curtain(event)">
|
||||
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right">
|
||||
<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" %}
|
||||
<div class="handler_menu close" onclick="open_curtain(null,'right')">
|
||||
<div class="handler_menu close" onclick="open_curtain_w_btn_profile()">
|
||||
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
<div class="text_f_curtain left"><img style='width: 25px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'></div>
|
||||
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
@@ -75,7 +75,7 @@
|
||||
<div class="menu_buttons curtain left open first filters" data-name="<img style='width: 25px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'>">
|
||||
|
||||
{% include "forms/f_find_route_filters_form.html" %}
|
||||
<div class="handler_menu close" onclick="open_curtain('left')">
|
||||
<div class="handler_menu close" onclick="open_curtain_w_contacts()">
|
||||
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
<div class="text_f_curtain left"><img style='width: 25px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'></div>
|
||||
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||
|
||||
Reference in New Issue
Block a user