From ad9130b5383502ea333d1d6ef1b05a22e2245a7a Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 9 Dec 2023 16:01:43 +0200 Subject: [PATCH] Single doc mode: edit on click --- public/css/toggle-dependent.css | 2 +- public/scripts/chats.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/css/toggle-dependent.css b/public/css/toggle-dependent.css index cefca4747..1dce66958 100644 --- a/public/css/toggle-dependent.css +++ b/public/css/toggle-dependent.css @@ -214,7 +214,7 @@ body.bubblechat .mes[is_user="true"] { /* Document Style */ body.documentstyle #chat .mes:not(.last_mes) { - padding: 0 10px; + padding: 5px 10px 0px 10px; } body.documentstyle .last_mes { diff --git a/public/scripts/chats.js b/public/scripts/chats.js index 508815651..2fbe3760a 100644 --- a/public/scripts/chats.js +++ b/public/scripts/chats.js @@ -400,6 +400,11 @@ jQuery(function () { callPopup(wrapper, 'text', '', { wide: true, large: true }); }); + $(document).on('click', 'body.documentstyle .mes .mes_text', function () { + if ($('.edit_textarea').length) return; + $(this).closest('.mes').find('.mes_edit').trigger('click'); + }); + $('#file_form_input').on('change', onFileAttach); $('#file_form').on('reset', function () { $('#file_form').addClass('displayNone');