diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index e903f8f..684624b 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -484,6 +484,18 @@ padding-top: 9%; } +.icon_unread_messages{ + display: none; +} + +.icon_unread_messages.showed{ + width: 12%; + height: 100%; + float: right; + padding-top: 9%; + display: block; +} + .cost-messages-in-user-tab-messenger{ width: 25px; diff --git a/static/js/chat_socket_functions/etc_operations_for_chat_socket.js b/static/js/chat_socket_functions/etc_operations_for_chat_socket.js index 397de26..935e0bf 100644 --- a/static/js/chat_socket_functions/etc_operations_for_chat_socket.js +++ b/static/js/chat_socket_functions/etc_operations_for_chat_socket.js @@ -1,8 +1,12 @@ function update_count_unread_messages (data) { - let list_unrd = document.querySelectorAll(".qs") + let list_unrd = document.querySelectorAll(".unredmessages_value_text") + let list_unrd_parent = document.querySelectorAll(".icon_unread_messages") let i = 0 for (i;i < list_unrd.length;i++){ + if (!list_unrd_parent[i].classList.contains("showed")){ + list_unrd_parent[i].classList.toggle("showed") + } list_unrd[i].innerHTML = data.unread_msgs_count.toString() } } diff --git a/static/js/chat_sockets.js b/static/js/chat_sockets.js index ab2949b..e3a5786 100644 --- a/static/js/chat_sockets.js +++ b/static/js/chat_sockets.js @@ -62,27 +62,27 @@ function wsReceiveData (e) { // не найден user id } } else { - let error_ticket_manager = "ticket_manager is not defined" + let error_ticket_manager = "Error ticket_manager is not defined" console.log(error_ticket_manager) } } else { - if (data.chat_html){ - if (msg_cont){ - if (msg_cont.dataset['curReceiver'] === data['sender'].toString() || msg_cont.dataset['curReceiver'] === data['receiver'].toString()) { - msg_cont.innerHTML = data.chat_html - } - } else { - let error_msg_cont = "msg_cont is not defined" - console.log(error_msg_cont) - } - } else if (data.support_chat_html){ + // if (data.chat_html){ + // if (msg_cont){ + // if (msg_cont.dataset['curReceiver'] === data['sender'].toString() || msg_cont.dataset['curReceiver'] === data['receiver'].toString()) { + // msg_cont.innerHTML = data.chat_html + // } + // } else { + // let error_msg_cont = "Error msg_cont is not defined" + // console.log(error_msg_cont) + // } + if (data.support_chat_html){ let cont_mes_ins = document.querySelector(".info_profile") if (cont_mes_ins){ cont_mes_ins.innerHTML = data.support_chat_html } else { - let error_cont_mes_ins = "cont_mes_ins is not defined" + let error_cont_mes_ins = "Error cont_mes_ins is not defined" console.log(error_cont_mes_ins) // не найден info profile } diff --git a/templates/blocks/b_header.html b/templates/blocks/b_header.html index 484be17..7bcf6ab 100644 --- a/templates/blocks/b_header.html +++ b/templates/blocks/b_header.html @@ -37,6 +37,11 @@ {{ user.first_name }} {{ user.last_name }} +
+
+ +
+
diff --git a/templates/blocks/b_user_profile.html b/templates/blocks/b_user_profile.html index 1fe0294..692b33d 100644 --- a/templates/blocks/b_user_profile.html +++ b/templates/blocks/b_user_profile.html @@ -18,9 +18,9 @@
Написать сообщение -
-
- +
+
+
diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index 61ef6e4..b3177ee 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -160,9 +160,8 @@ {# name="type_transport"#} {# id="id_cargo_type_plane"#} {# />#} -{##} +{##}{# #} {# #} {#
#} diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 95595be..d722c1e 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -44,6 +44,7 @@
{{ route.get_cargo_type_display }}
{{ route.weight }}
+
{{ route.get_owner_type_display }}
{% if route.owner != user %}