From 588a8bb7a017901b01e5d3e2103bd787fb160a1c Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 3 Aug 2023 10:13:10 +0300 Subject: [PATCH] move function call to js file --- files/assets/js/comments_v.js | 6 ++++++ files/templates/comments.html | 4 ++-- files/templates/util/macros.html | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index 4cb23d878..240946658 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -170,6 +170,8 @@ function post_reply(id) { input.previousElementSibling.innerHTML = ''; input.value = null; oldfiles[ta.id] = [] + + remove_dialog(); } else { showToast(false, getMessageFromJsonData(false, data)); } @@ -219,6 +221,8 @@ function comment_edit(id){ input.previousElementSibling.innerHTML = ''; input.value = null; oldfiles[ta.id] = [] + + remove_dialog(); } else { showToast(false, getMessageFromJsonData(false, data)); @@ -293,6 +297,8 @@ function post_comment(fullname, hide){ const ghost_town_box = document.getElementById('ghost-town-box') if (ghost_town_box) ghost_town_box.remove() + + remove_dialog(); } else { showToast(false, getMessageFromJsonData(false, data)); diff --git a/files/templates/comments.html b/files/templates/comments.html index 0927a7d9e..f746aa67a 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -273,7 +273,7 @@ Formatting help - + @@ -562,7 +562,7 @@ - +
diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index d2a23c4f8..81aa46b15 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -131,7 +131,7 @@ {{file_input('file-upload-reply-' ~ target_fullname, False)}} {% endif %} - + {% if enable_cancel_button %}