mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Microblog: Fix reply button in inline comments below post
This commit is contained in:
parent
afa1d7e71c
commit
497e55b1a7
2 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
|||
{var author = $comment->getOwner()}
|
||||
{var $Club = openvk\Web\Models\Entities\Club::class}
|
||||
{var postId = $comment->getTarget() instanceof \openvk\Web\Models\Entities\Post ? $comment->getTarget()->getId() : NULL}
|
||||
|
||||
<a name="cid={$comment->getId()}"></a>
|
||||
<table border="0" style="font-size: 11px;" class="post comment" id="_comment{$comment->getId()}" data-comment-id="{$comment->getId()}" data-owner-id="{$author->getId()}" data-from-group="{$comment->getOwner() instanceof $Club}">
|
||||
<table border="0" style="font-size: 11px;" class="post comment" id="_comment{$comment->getId()}" data-comment-id="{$comment->getId()}" data-owner-id="{$author->getId()}" data-from-group="{$comment->getOwner() instanceof $Club}" n:attr="data-post-id => $postId">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="30" valign="top">
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
u(".comment-reply").on("click", function(e) {
|
||||
let inputbox = u("#write textarea");
|
||||
let comment = u(e.target).closest(".post");
|
||||
let authorId = comment.data("owner-id");
|
||||
let authorNm = u(".post-author > a > b", comment.first()).text().trim();
|
||||
let fromGroup = Boolean(comment.data("from-group"));
|
||||
let postId = comment.data("post-id");
|
||||
console.log(postId)
|
||||
let inputbox = postId == null ? u("#write textarea") : u("#wall-post-input" + (postId || ""));
|
||||
|
||||
inputbox.text("[" + (fromGroup ? "club" : "id") + authorId + "|" + authorNm + "], ");
|
||||
inputbox.trigger("focusin");
|
||||
|
|
Loading…
Reference in a new issue