mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-22 22:05:15 +00:00
Display user likes
This commit is contained in:
@ -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>"
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -77,6 +77,7 @@ xhr.onload = function(){
|
||||
ApplyFriendsList();
|
||||
ApplyPosts();
|
||||
ApplyCommentsList();
|
||||
ApplyUserLikes();
|
||||
}
|
||||
|
||||
xhr.send(null);
|
Reference in New Issue
Block a user