From 4feb90cd0b545608b5df54dfcc20f5a5144eb172 Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 2 Aug 2023 14:12:44 +0300 Subject: [PATCH] 0.0.21 --- static/css/styles(boris).css | 83 ++++++++++++++++++++++++++++++++ static/js/user_profile(boris).js | 26 ++++++++++ templates/widgets/w_message.html | 31 +++++++++++- 3 files changed, 138 insertions(+), 2 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 14a8054..e6c11c1 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -471,4 +471,87 @@ .insert_users{ min-height: 440px; +} + +/*messgae*/ + + +.container-message_support_chat{ + width: 60%; + height: 90px; + margin-bottom: 70px; + margin-left: 20px; +} + +.container-message_support_chat.left{ + float: left; +} + +.container-message_support_chat.right{ + float: right; +} + +.block_avatar_message{ + width: 15%; + float: left; + /*margin-right: 20px;*/ +} + +.block_avatar_message > img{ + width: 30px; + height: 30px; +} + +.block_text_message{ + width: 85%; + float: right; +} + +.container_text_message{ + width: 100%; + height: 60px; + border-radius: 10px; +} + +.container_text_message.border{ + border: 1px solid #FF613A; + background: #FFFFFF; +} + +.container_text_message.background{ + background: #FF613A; + border: none; +} + +.text_message{ + font-size: 12px; + padding: 15px; + /*text-wrap: wrap;*/ + overflow-wrap: break-word; + display: block; +} + + +.container_text_message.background > span{ + color: #FFFFFF; +} + +.container_text_message.border > span{ + color: #272424; +} + +.data_send_message{ + margin-top: 10px; + font-size: 12px; + width: 100%; + height: 20px; + color: #000000; +} + +.data_send_message.left{ + text-align: left; +} + +.data_send_message.right{ + text-align: right; } \ No newline at end of file diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index e2801d6..076f10e 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -144,4 +144,30 @@ function createTicket (el) { function selectedUserMessenger (el){ el.classList.toggle("select") +} + +function sendMessage(id_ticket,sender,reciever,text){ + event.preventDefault() + + $.ajax({ + headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, + url: '/ru/messages/create_ticket/', + type: "POST", + // async: true, + cache: false, + processData: false, + contentType: false, + // enctype: 'json', + data: formData, + success: function(data){ + + document.querySelector(".insert-tech-place").innerHTML = data.html; + + }, + error: function (data){ + + document.querySelector(".insert-tech-place").innerHTML = data.responseJSON.html; + + } + }); } \ No newline at end of file diff --git a/templates/widgets/w_message.html b/templates/widgets/w_message.html index f432d36..72c6015 100644 --- a/templates/widgets/w_message.html +++ b/templates/widgets/w_message.html @@ -1,4 +1,31 @@ {% load static %} -
- +
+
+ +
+
+
+ + {{ msg.text }} + +
+
+ {{ msg.modifiedDT }} +
+
+
+
+
+ +
+
+
+ + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + +
+
+ 8:00 PM +
+
\ No newline at end of file