diff --git a/Web/Presenters/templates/components/comments.xml b/Web/Presenters/templates/components/comments.xml index 0df0c91f..a4bf59da 100644 --- a/Web/Presenters/templates/components/comments.xml +++ b/Web/Presenters/templates/components/comments.xml @@ -9,9 +9,11 @@ {if sizeof($comments) > 0} - {foreach $comments as $comment} - {include "comment.xml", comment => $comment} - {/foreach} +
+
+ {include "comment.xml", comment => $comment} +
+
{include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]}
diff --git a/Web/static/js/al_comments.js b/Web/static/js/al_comments.js index f4172428..70c7210d 100644 --- a/Web/static/js/al_comments.js +++ b/Web/static/js/al_comments.js @@ -1,4 +1,4 @@ -u(".comment-reply").on("click", function(e) { +u(document).on("click", ".comment-reply", function(e) { let comment = u(e.target).closest(".post"); let authorId = comment.data("owner-id"); let authorNm = u(".post-author > a > b", comment.first()).text().trim();