Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -111,7 +111,7 @@ function success_check_new_messages (data) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// document.cookie = old_cookeis + name_delete
|
||||||
}
|
}
|
||||||
|
|
||||||
function userOnline (set=null,check=null) {
|
function userOnline (set=null,check=null) {
|
||||||
|
|||||||
@@ -3,30 +3,25 @@ $(document).ready(function (){
|
|||||||
})
|
})
|
||||||
|
|
||||||
function getNewMessageSession (){
|
function getNewMessageSession (){
|
||||||
var o = document.cookie.split("; ");
|
|
||||||
var r = [{}];
|
|
||||||
for(var i = 0;i < o.length;i++){
|
|
||||||
r[o[i].split("=")[0]] = o[i].split("=")[1];
|
|
||||||
}
|
|
||||||
let prs_ = null
|
let prs_ = null
|
||||||
if (r['user_alerts'] !== undefined){
|
let r = getCookieValue('user_alerts')
|
||||||
let prs = JSON.parse(r['user_alerts'])
|
if (r !== undefined && r !== null && r !== ""){
|
||||||
prs_ = JSON.parse(prs)
|
|
||||||
|
let prs = JSON.parse(r)
|
||||||
|
prs_ = JSON.parse(r)
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (prs === "{'new_message': True}"){
|
|
||||||
// prs = {
|
|
||||||
// 'new_message' : 'True'
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// prs = {
|
|
||||||
// 'new_message' : 'False'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// b = cookieS
|
|
||||||
// let b = CookieStore.getAll()
|
|
||||||
return prs_;
|
return prs_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var old_cookeis = document.cookie
|
||||||
|
var name_delete = null
|
||||||
|
|
||||||
|
function getCookieValue(name) {
|
||||||
|
let result = document.cookie.match("(^|[^;]+)\s*" + name + "\s*=\s*([^;]+)")
|
||||||
|
return result ? result.pop() : ""
|
||||||
|
name_delete = name
|
||||||
|
}
|
||||||
@@ -38,34 +38,36 @@
|
|||||||
{# </div>#}
|
{# </div>#}
|
||||||
{#</div>#}
|
{#</div>#}
|
||||||
|
|
||||||
|
{% if cur_receiver %}
|
||||||
<div class="block-chat">
|
<div class="block-chat">
|
||||||
<div class="container-header-chat">
|
<div class="container-header-chat">
|
||||||
<div class="header-chat-left-part">
|
<div class="header-chat-left-part">
|
||||||
<img class="chat-avatar" src="{% static "delete_later/Avatar.png" %}">
|
<img class="chat-avatar" src="{% static "delete_later/Avatar.png" %}">
|
||||||
{# <span class="chat-username">{{ ticket.manager.last_name }} {{ ticket.manager.first_name }}</span>#}
|
{# <span class="chat-username">{{ ticket.manager.last_name }} {{ ticket.manager.first_name }}</span>#}
|
||||||
<span class="chat-username">{{ cur_receiver.last_name }} {{ cur_receiver.first_name }}</span>
|
<span class="chat-username">{{ cur_receiver.last_name }} {{ cur_receiver.first_name }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="header-chat-right-part">
|
||||||
|
<img class="header-icons-right-part-padding" src="{% static "img/svg/phone.svg" %}">
|
||||||
|
<img class="header-icons-right-part-padding" src="{% static "img/svg/info.svg" %}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-chat-right-part">
|
<div class="container-messages" data-user-id="{{ user.id }}" data-cur-receiver="{{ cur_receiver.id }}" data-ticket-id="null" >
|
||||||
<img class="header-icons-right-part-padding" src="{% static "img/svg/phone.svg" %}">
|
{% include "blocks/profile/b_messages_container.html" %}
|
||||||
<img class="header-icons-right-part-padding" src="{% static "img/svg/info.svg" %}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="container-messages" data-user-id="{{ user.id }}" data-cur-receiver="{{ cur_receiver.id }}" data-ticket-id="null" >
|
|
||||||
{% include "blocks/profile/b_messages_container.html" %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="footer-chat">
|
<div class="footer-chat">
|
||||||
<div class="left-part-block-enter-message">
|
<div class="left-part-block-enter-message">
|
||||||
<input class="enter-message-inp" onkeypress="sendMessageEnter(event,null,{{ user.id }},{{ cur_receiver.id }})" placeholder="Отправить сообщение">
|
<input class="enter-message-inp" onkeypress="sendMessageEnter(event,null,{{ user.id }},{{ cur_receiver.id }})" placeholder="Отправить сообщение">
|
||||||
</div>
|
</div>
|
||||||
<div class="right-part-block-enter-message">
|
<div class="right-part-block-enter-message">
|
||||||
<button class="attach-file-btn-message" onclick="attachFilemeassge()"></button>
|
<button class="attach-file-btn-message" onclick="attachFilemeassge()"></button>
|
||||||
<button class="send-message" onclick="sendMessage(null,{{ user.id }},{{ cur_receiver.id }})"></button>
|
<button class="send-message" onclick="sendMessage(null,{{ user.id }},{{ cur_receiver.id }})"></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
<div class="block-list-of-users">
|
<div class="block-list-of-users">
|
||||||
{% include "blocks/profile/b_list_of_users_messenger.html" %}
|
{% include "blocks/profile/b_list_of_users_messenger.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user