allow comments scroll

This commit is contained in:
mrilyew 2024-11-02 12:13:17 +03:00
parent 8fc47ff6cd
commit 389f0b4bb4
2 changed files with 6 additions and 4 deletions

View file

@ -9,9 +9,11 @@
</div>
{if sizeof($comments) > 0}
{foreach $comments as $comment}
{include "comment.xml", comment => $comment}
{/foreach}
<div class='scroll_container'>
<div class='scroll_node' n:foreach="$comments as $comment">
{include "comment.xml", comment => $comment}
</div>
</div>
<div style="margin-top: 11px;">
{include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]}
</div>

View file

@ -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();