Browse Source

Fix missing ajax for comment adding

k4be 1 year ago
parent
commit
9d27ea9546
1 changed files with 6 additions and 1 deletions
  1. 6 1
      comment.js

+ 6 - 1
comment.js

@@ -64,6 +64,7 @@ function refreshComments() {
 		url: scriptUrlPrefix+'getcomments.php',
 		success: function(data) {
 			$('#comments').html(data);
+			addCommentFormSubmitAction();
 		},
 	});
 }
@@ -72,7 +73,11 @@ function commentsImageReplace(image) {
 	$('#comment-id').val(image.id);
 }
 
-$(document).ready(function() {
+function addCommentFormSubmitAction() {
 	$('#comment-form').on('submit', commentFormSubmit);
+}
+
+$(document).ready(function() {
+	addCommentFormSubmitAction();
 });