mirror of
https://github.com/openvk/openvk
synced 2024-12-23 17:12:01 +03:00
Fixup "Groups: Add the ability to write comments on behalf of the group"
Sorry, I just forgot to add this file to the commit :3
This commit is contained in:
parent
7f4dabef4b
commit
c52bc1010a
1 changed files with 8 additions and 5 deletions
|
@ -1,9 +1,12 @@
|
||||||
u(".comment-reply").on("click", function(e) {
|
u(".comment-reply").on("click", function(e) {
|
||||||
let inputbox = u("#write textarea");
|
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 postId = comment.data("post-id");
|
||||||
|
console.log(postId)
|
||||||
|
|
||||||
inputbox.text("[id" + authorId + "|" + authorNm + "], ");
|
inputbox.text("[" + (fromGroup ? "club" : "id") + "" + authorId + "|" + authorNm + "], ");
|
||||||
inputbox.trigger("focusin");
|
inputbox.trigger("focusin");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue