From 337d8ea78c2e799257fa4cbaf0ba96bc7c3d05d3 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 20 Nov 2020 14:42:46 +0000 Subject: minor cleanup --- view/js/main.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index bd595dbb3..c6460f356 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1366,20 +1366,18 @@ function post_comment(id) { if(data.success) { localStorage.removeItem("comment_body-" + id); $("#comment-edit-preview-" + id).hide(); - //$("#comment-edit-wrapper-" + id).hide(); - $("#comment-edit-text-" + id).val('').blur().attr('placeholder', aStr.comment); + $('#wall-item-comment-wrapper-' + id).before(data.html); + $('#wall-item-ago-' + data.id + ' .autotime').timeago(); + $('body').css('cursor', 'unset'); + commentBusy = false; + var tarea = document.getElementById("comment-edit-text-" + id); if(tarea) { commentClose(tarea, id); - $(document).unbind( "click.commentOpen"); + $(document).off( "click.commentOpen"); } - $('#wall-item-comment-wrapper-' + id).before(data.html); - $('#wall-item-ago-' + data.id + ' .autotime').timeago(); - $('body').css('cursor', 'unset'); - //if(timer) clearTimeout(timer); - //timer = setTimeout(updateInit, 500); } if(data.reload) { window.location.href=data.reload; -- cgit v1.2.3