diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 2e43b32..222464f 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -260,7 +260,7 @@ .block-chat{ width: 67%; - height: 100%; + height: 63vh; border-radius: 10px; border: 1px solid #E6E6E6; background: #ffffff; @@ -272,13 +272,13 @@ .block-list-of-users{ width: 30%; margin-left: 20px; - height: 100%; + height: 63vh; border-radius: 10px; border: 1px solid #E6E6E6; background: #ffffff; box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); float: right; - + overflow-y: auto; } .container-header-chat{ @@ -324,7 +324,7 @@ .container-messages{ height: 74%; width: 100%; - min-height: 376px; + /*min-height: 376px;*/ overflow-y: auto; } @@ -571,4 +571,12 @@ .data_send_message.right{ text-align: right; +} + +/*right curtain messenger*/ + +.block_tickets_in_work{ + padding-top: 10px; + border-top: 1px solid #E6E6E6; + width: 100%; } \ No newline at end of file diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index f76c13c..8e7388f 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -142,8 +142,46 @@ function createTicket (el) { }); } -function selectedUserMessenger (el){ - el.classList.toggle("select") +var selected_users = [] + +function selectedUserMessenger (el,ticket_id){ + selected_users.push(el) + let i = 0 + selected_users.map(function (){ + if (selected_users[i] === el){ + el.classList.toggle("select") + } + else { + if (selected_users[i].classList.contains("select")){ + selected_users[i].classList.remove("select") + } + } + i++ + }) + let data = { + 'ticket_id': ticket_id + } + $.ajax({ + headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, + url: '/ru/messages/support_show_chat_by_ticket/', + type: "POST", + // async: true, + cache: false, + processData: false, + contentType: false, + // enctype: 'json', + data: JSON.stringify(data), + success: function(data){ + + document.querySelector(".info_profile").innerHTML = data.html; + + }, + error: function (data){ + + document.querySelector(".info_profile").innerHTML = data.responseJSON.html; + + } + }); } function sendMessage(id_ticket,sender,reciever,text){ diff --git a/templates/blocks/profile/b_support_chat.html b/templates/blocks/profile/b_support_chat.html index dda45e4..ea20bec 100644 --- a/templates/blocks/profile/b_support_chat.html +++ b/templates/blocks/profile/b_support_chat.html @@ -1,9 +1,14 @@ {% load static %} -{% load static %} +{#{% load static %}#} +{#
#} +
+
+

Техническая поддержка

+
{{ ticket.name }}
@@ -59,7 +64,7 @@ {% endif %}
-
+
Тикеты в работе {% if tickets_for_manager %} {% for ticket in tickets_for_manager %} @@ -69,4 +74,6 @@
{% endif %} -
\ No newline at end of file + + +{##} \ No newline at end of file diff --git a/templates/widgets/w_message.html b/templates/widgets/w_message.html index 9cd3cfb..d2fc8c5 100644 --- a/templates/widgets/w_message.html +++ b/templates/widgets/w_message.html @@ -1,6 +1,6 @@ {% load static %} -
+
diff --git a/templates/widgets/w_tab_user.html b/templates/widgets/w_tab_user.html index e402ee4..647b9fe 100644 --- a/templates/widgets/w_tab_user.html +++ b/templates/widgets/w_tab_user.html @@ -1,5 +1,5 @@ {% load static %} -
+