0.8.392
This commit is contained in:
@@ -402,7 +402,9 @@ def support_show_chat_by_ticket_ajax(request):
|
|||||||
'ticket': ticket,
|
'ticket': ticket,
|
||||||
'messages': msgs,
|
'messages': msgs,
|
||||||
'cur_receiver': cur_receiver,
|
'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))
|
Dict.update(get_ticketsDict_for_staff(request.user))
|
||||||
|
|
||||||
|
|||||||
@@ -608,16 +608,18 @@
|
|||||||
}
|
}
|
||||||
.cut_width_f_curtain.n_profile.left{
|
.cut_width_f_curtain.n_profile.left{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
min-width: 1280px;
|
/*min-width: 1280px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.cut_width_f_curtain.n_profile.close{
|
/*.cut_width_f_curtain.n_profile.close{*/
|
||||||
z-index: -1;
|
/* display: none;*/
|
||||||
}
|
/* min-width: 1280px;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
.cut_width_f_curtain.n_profile.open{
|
/*.cut_width_f_curtain.n_profile.open{*/
|
||||||
z-index: 101;
|
/* display: block;*/
|
||||||
}
|
/* min-width: 1280px;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
|
||||||
.menu_buttons{
|
.menu_buttons{
|
||||||
@@ -788,6 +790,12 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
.support .menu_buttons.left.open.margin{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.block_overlay.show{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
#customer>a, #mover>a{
|
#customer>a, #mover>a{
|
||||||
left: 5%;
|
left: 5%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2360,15 +2360,16 @@
|
|||||||
|
|
||||||
.cut_width_f_curtain.n_profile.right{
|
.cut_width_f_curtain.n_profile.right{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
min-width: 1280px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cut_width_f_curtain.n_profile.close{
|
.cut_width_f_curtain.n_profile.close{
|
||||||
z-index: -1;
|
display: none;
|
||||||
|
min-width: 1280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cut_width_f_curtain.n_profile.open{
|
.cut_width_f_curtain.n_profile.open{
|
||||||
z-index: 101;
|
display: block;
|
||||||
|
min-width: 1280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2405,6 +2406,7 @@
|
|||||||
max-height: calc(100vh - 125px);
|
max-height: calc(100vh - 125px);
|
||||||
overflow: unset;
|
overflow: unset;
|
||||||
left: -19px;
|
left: -19px;
|
||||||
|
top: 0;
|
||||||
}
|
}
|
||||||
.menu_buttons.curtain.left.close.chat .container_block_list_of_users {
|
.menu_buttons.curtain.left.close.chat .container_block_list_of_users {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ function select_tab_profile (el,url,owner_type=null) {
|
|||||||
middleWareJS()
|
middleWareJS()
|
||||||
let user_type = getInfoAboutUser()
|
let user_type = getInfoAboutUser()
|
||||||
if (user_type === 'mobile') {
|
if (user_type === 'mobile') {
|
||||||
closeCurtain()
|
open_curtain_w_btn_profile()
|
||||||
} else {
|
} else {
|
||||||
if (!window.location.href.includes('profile')){
|
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()
|
let user_type = getInfoAboutUser()
|
||||||
if (user_type === 'mobile' || user_type === 'laptop') {
|
if (user_type === 'mobile' || user_type === 'laptop') {
|
||||||
closeCurtain('left')
|
open_curtain_w_contacts()
|
||||||
} else if (!window.location.href.includes('profile')){
|
|
||||||
closeCurtain()
|
|
||||||
}
|
}
|
||||||
|
data['mobile'] = getInfoAboutUser() === 'mobile' || getInfoAboutUser() === 'laptop'
|
||||||
$.ajax({
|
$.ajax({
|
||||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||||
url: '/messages/' + url,
|
url: '/messages/' + url,
|
||||||
@@ -477,6 +476,7 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
|
|||||||
if (loader){
|
if (loader){
|
||||||
loader.classList.toggle("show")
|
loader.classList.toggle("show")
|
||||||
}
|
}
|
||||||
|
// let left_curtain = document.querySelector('.curtain.left')
|
||||||
document.querySelector(".info_profile").innerHTML = data.html;
|
document.querySelector(".info_profile").innerHTML = data.html;
|
||||||
document.querySelector(".enter-message-inp").focus()
|
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 () {
|
function open_curtain_w_btn_profile () {
|
||||||
let el = document.querySelector(".menu_profile_btn")
|
let curtain = document.querySelector(".menu_buttons.right")
|
||||||
if (el) {
|
curtain.classList.toggle("open")
|
||||||
el.classList.toggle("show")
|
curtain.classList.toggle("close")
|
||||||
closeCurtain()
|
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) {
|
function open_curtain_w_contacts () {
|
||||||
if (left){
|
let curtain = document.querySelector('.menu_buttons.left')
|
||||||
let left = document.querySelector(".curtain.left")
|
open_overlay(curtain)
|
||||||
open_curtain(left,null,null,'close')
|
curtain.classList.toggle('open')
|
||||||
} else if (right){
|
curtain.classList.toggle('close')
|
||||||
let right = document.querySelector(".curtain.right")
|
if (curtain.classList.contains('first')){
|
||||||
open_curtain(null,right,null,'close')
|
curtain.classList.remove('first')
|
||||||
} else {
|
curtain.classList.toggle('open')
|
||||||
let curtain = getOpenCurtain()
|
curtain.classList.toggle('close')
|
||||||
if (curtain) {
|
|
||||||
open_curtain(null, null, null, 'close')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_curtain_z_index(curtain)
|
||||||
|
last_open_curtain = curtain
|
||||||
|
close_first_curt(curtain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function open_overlay (curtain) {
|
||||||
function open_curtain (left=null,right=null,overlay=null,close=null){
|
let overlay = document.querySelector('.block_overlay')
|
||||||
let page_profile = true
|
if (curtain.classList.contains("left")){
|
||||||
let curtain_name = ''
|
if (!curtain.classList.contains('close') && overlay.classList.contains('show')){
|
||||||
let curtain = ''
|
overlay.classList.toggle("show")
|
||||||
let left_curtain = document.querySelector(".menu_buttons.left")
|
overlay.classList.toggle("hidden")
|
||||||
let right_curtain = document.querySelector(".menu_buttons.right")
|
} else if (curtain.classList.contains('close') && overlay.classList.contains('show')){
|
||||||
let container_curtain = document.querySelector(".cut_width_f_curtain")
|
overlay.classList.remove("show")
|
||||||
if (left || right){
|
overlay.classList.add("hidden")
|
||||||
if (left){
|
} else if (!curtain.classList.contains('open') && overlay.classList.contains('hidden')){
|
||||||
if (left_curtain){
|
overlay.classList.add('show')
|
||||||
curtain = left_curtain
|
overlay.classList.remove('hidden')
|
||||||
newCurtainZIndex(curtain)
|
} else if (curtain.classList.contains('open') && overlay.classList.contains('hidden') && window.location.href.includes('routes')) {
|
||||||
if (right_curtain) {
|
overlay.classList.toggle('show')
|
||||||
right_curtain.style.zIndex = '99'
|
overlay.classList.toggle('hidden')
|
||||||
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 {
|
} else {
|
||||||
curtain = getOpenCurtain()
|
overlay.classList.toggle("show")
|
||||||
curtain_name = getInfoCurtain(null,null,'name')['name']
|
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()
|
function toggle_cut_width_curtain (el) {
|
||||||
if (user_type === 'mobile' || user_type === 'laptop') {
|
let parent = el.parentNode
|
||||||
curtain.classList.remove("open")
|
parent.classList.toggle('open')
|
||||||
curtain.classList.add("close")
|
parent.classList.toggle('close')
|
||||||
container_curtain.classList.remove("open")
|
}
|
||||||
container_curtain.classList.add("close")
|
|
||||||
|
|
||||||
closeOverlay()
|
function close_first_curt (curtain) {
|
||||||
} else if (!window.location.href.includes('profile')){
|
let curtains = document.querySelectorAll(".curtain.open")
|
||||||
//
|
let i = 0
|
||||||
} else {
|
if (curtains.length >= 2){
|
||||||
curtain.classList.remove("open")
|
curtains.forEach(function (){
|
||||||
curtain.classList.add("close")
|
let cur_el = curtains[i]
|
||||||
container_curtain.classList.remove("open")
|
if (cur_el !== curtain){
|
||||||
container_curtain.classList.add("close")
|
cur_el.classList.toggle('open')
|
||||||
}
|
cur_el.classList.toggle('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)
|
i++
|
||||||
curtain.classList.add("open")
|
})
|
||||||
curtain.classList.remove("close")
|
open_overlay(curtain)
|
||||||
} 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 () {
|
function set_curtain_z_index (curtain) {
|
||||||
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 curtains = document.querySelectorAll(".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
|
let i = 0
|
||||||
curtains.forEach(function (){
|
curtains.forEach(function (){
|
||||||
let el = curtains[i]
|
let cur_el = curtains[i]
|
||||||
if (!el === cur_curtain){
|
if (cur_el === curtain){
|
||||||
curtain_f_delete = el
|
cur_el.style.zIndex = 101
|
||||||
|
} else {
|
||||||
|
cur_el.style.zIndex = 99
|
||||||
}
|
}
|
||||||
i++
|
i++
|
||||||
})
|
})
|
||||||
return curtain_f_delete
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getInfoCurtain (curtain,zIndex,name) {
|
function close_open_curtain (){
|
||||||
let data = {}
|
let curtains = document.querySelectorAll('.curtain.open')
|
||||||
let curtain_f_w = null
|
if (curtains.length >= 2){
|
||||||
if (curtain){
|
if (last_open_curtain){
|
||||||
let type_curt = getTypeOfData(curtain)
|
last_open_curtain.classList.toggle('open')
|
||||||
if (curtain[0] && type_curt === 'object'){
|
last_open_curtain.classList.toggle('close')
|
||||||
curtain_f_w = curtain[0]
|
open_overlay(last_open_curtain)
|
||||||
} else {
|
} else if (window.location.href.includes('profile')) {
|
||||||
curtain_f_w = curtain
|
let curtain = document.querySelector('.menu_buttons.right')
|
||||||
|
curtain.classList.toggle('open')
|
||||||
|
curtain.classList.toggle('close')
|
||||||
|
open_overlay(curtain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
curtain_f_w = getOpenCurtain()
|
let curtain = document.querySelector('.curtain.open')
|
||||||
let type_curt = getTypeOfData(curtain_f_w)
|
curtain.classList.toggle("open")
|
||||||
if (curtain_f_w[0]){
|
curtain.classList.toggle("close")
|
||||||
if (type_curt === 'object'){
|
open_overlay(curtain)
|
||||||
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]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 %}
|
{% if user.is_authenticated %}
|
||||||
{# boris changed #}
|
{# boris changed #}
|
||||||
<div class="cont_header_btn_profile">
|
<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 }}">#}
|
{# <div class="button_profile_header" onclick="open_curtain(null,'right')" data-user-id="{{ user.id }}">#}
|
||||||
|
|
||||||
<span class="btn_profile_name">
|
<span class="btn_profile_name">
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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="">
|
<img src="/static/img/svg/userMobile.svg" alt="">
|
||||||
</div>
|
</div>
|
||||||
{# <div class="menu_profile_btn">#}
|
{# <div class="menu_profile_btn">#}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="container_block_list_of_users">
|
<div class="container_block_list_of_users">
|
||||||
{% include 'blocks/profile/b_list_of_users_messenger.html' %}
|
{% include 'blocks/profile/b_list_of_users_messenger.html' %}
|
||||||
</div>
|
</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' %}">
|
<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>
|
<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' %}">
|
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
{# <h1>Техническая поддержка</h1>#}
|
{# <h1>Техническая поддержка</h1>#}
|
||||||
{# </div>#}
|
{# </div>#}
|
||||||
<img class="loader_chat_f_sw_chats support" src="{% static "/img/svg/loader.svg" %}" alt="loader">
|
<img class="loader_chat_f_sw_chats support" src="{% static "/img/svg/loader.svg" %}" alt="loader">
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff or 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" %}'>">
|
<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">
|
<div class="container_block_list_of_users">
|
||||||
{% include 'blocks/profile/b_list_of_tickets_support_chat.html' %}
|
{% include 'blocks/profile/b_list_of_tickets_support_chat.html' %}
|
||||||
</div>
|
</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' %}">
|
<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>
|
<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' %}">
|
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||||
|
|||||||
@@ -53,16 +53,16 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body {% if page_type == 'routes' %}onscroll="scroll_ev(event,this)" {% endif %}>
|
<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">
|
<div class="wrapper_main">
|
||||||
|
|
||||||
{% include 'blocks/b_header.html' %}
|
{% 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" %}'>">
|
<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" %}
|
{% 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' %}">
|
<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>
|
<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' %}">
|
<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" %}'>">
|
<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" %}
|
{% 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' %}">
|
<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>
|
<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' %}">
|
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
|
||||||
|
|||||||
Reference in New Issue
Block a user