Display user likes

This commit is contained in:
2019-01-14 21:12:06 +01:00
parent 64ead89601
commit 4a24d5249c
3 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,28 @@
/**
* Likes category
*
* @author Pierre HUBERT
*/
/**
* Apply all user likes
*/
function ApplyUserLikes() {
let target = document.querySelector("#all-likes-table tbody");
data.likes.forEach(like => {
createElem2({
appendTo: target,
type: "tr",
innerHTML:
"<td>" + like.id + "</td>" +
"<td>" + timeToStr(like.time_sent) + "</td>" +
"<td>" + like.elem_type + "</td>" +
"<td>" + like.elem_id + "</td>"
});
});
}

View File

@ -77,6 +77,7 @@ xhr.onload = function(){
ApplyFriendsList();
ApplyPosts();
ApplyCommentsList();
ApplyUserLikes();
}
xhr.send(null);