mirror of
https://github.com/openvk/openvk
synced 2025-07-07 16:29:50 +03:00
Merge branch 'openvk:master' into master
This commit is contained in:
commit
69b3822f89
6 changed files with 19 additions and 3 deletions
|
@ -47,3 +47,7 @@
|
||||||
</script>
|
</script>
|
||||||
</center>
|
</center>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
|
||||||
|
{script "js/al_comments.js"}
|
||||||
|
{/if}
|
||||||
|
|
|
@ -17,3 +17,7 @@
|
||||||
{include "../components/paginator.xml", conf => $paginatorConf}
|
{include "../components/paginator.xml", conf => $paginatorConf}
|
||||||
</center>
|
</center>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
|
||||||
|
{script "js/al_comments.js"}
|
||||||
|
{/if}
|
||||||
|
|
|
@ -34,3 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
|
||||||
|
{script "js/al_comments.js"}
|
||||||
|
{/if}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{var author = $comment->getOwner()}
|
{var author = $comment->getOwner()}
|
||||||
{var $Club = openvk\Web\Models\Entities\Club::class}
|
{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>
|
<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>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30" valign="top">
|
<td width="30" valign="top">
|
||||||
|
|
|
@ -25,3 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
|
||||||
|
{script "js/al_comments.js"}
|
||||||
|
{/if}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
u(".comment-reply").on("click", function(e) {
|
u(".comment-reply").on("click", function(e) {
|
||||||
let inputbox = u("#write textarea");
|
|
||||||
let comment = u(e.target).closest(".post");
|
let comment = u(e.target).closest(".post");
|
||||||
let authorId = comment.data("owner-id");
|
let authorId = comment.data("owner-id");
|
||||||
let authorNm = u(".post-author > a > b", comment.first()).text().trim();
|
let authorNm = u(".post-author > a > b", comment.first()).text().trim();
|
||||||
let fromGroup = Boolean(comment.data("from-group"));
|
let fromGroup = Boolean(comment.data("from-group"));
|
||||||
let postId = comment.data("post-id");
|
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.text("[" + (fromGroup ? "club" : "id") + authorId + "|" + authorNm + "], ");
|
||||||
inputbox.trigger("focusin");
|
inputbox.trigger("focusin");
|
||||||
|
|
Loading…
Reference in a new issue