From a3634a254219e4378c1d0c451dd4257f88297c3c Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 27 Jan 2018 18:54:12 +0100 Subject: [PATCH] Can like comments --- assets/js/components/comments/ui.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/assets/js/components/comments/ui.js b/assets/js/components/comments/ui.js index 38d34d06..b4234279 100644 --- a/assets/js/components/comments/ui.js +++ b/assets/js/components/comments/ui.js @@ -251,6 +251,27 @@ ComunicWeb.components.comments.ui = { } } + + //Load likes + var likesTarget = createElem2({ + appendTo: commentText, + type: "div", + }); + + var userLiking = null; + if(signed_in()){ + userLiking = infos.userlike; + } + + //Call component + ComunicWeb.components.like.button.display( + "comment", + infos.ID, + infos.likes, + userLiking, + likesTarget + ); + }, } \ No newline at end of file