From 4a24d5249ce046fdfedd3e38f17ee48ecb019202 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 14 Jan 2019 21:12:06 +0100 Subject: [PATCH] Display user likes --- .../Export.html | 22 ++++++++++++++- .../assets/js/categories/likes.js | 28 +++++++++++++++++++ .../assets/js/main.js | 1 + 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 assets/zip/personnal-data-export-navigator/assets/js/categories/likes.js diff --git a/assets/zip/personnal-data-export-navigator/Export.html b/assets/zip/personnal-data-export-navigator/Export.html index 9680a11e..5f1221e2 100644 --- a/assets/zip/personnal-data-export-navigator/Export.html +++ b/assets/zip/personnal-data-export-navigator/Export.html @@ -122,8 +122,27 @@ +
- Loading likes +

All your likes

+ + + + + + + + + + + + + + + + +
NumberDateElement typeElement ID
+
@@ -152,6 +171,7 @@ + \ No newline at end of file diff --git a/assets/zip/personnal-data-export-navigator/assets/js/categories/likes.js b/assets/zip/personnal-data-export-navigator/assets/js/categories/likes.js new file mode 100644 index 00000000..a4e09da2 --- /dev/null +++ b/assets/zip/personnal-data-export-navigator/assets/js/categories/likes.js @@ -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: + "" + like.id + "" + + "" + timeToStr(like.time_sent) + "" + + "" + like.elem_type + "" + + "" + like.elem_id + "" + }); + + }); + +} \ No newline at end of file diff --git a/assets/zip/personnal-data-export-navigator/assets/js/main.js b/assets/zip/personnal-data-export-navigator/assets/js/main.js index c6f5611c..d46a06fb 100644 --- a/assets/zip/personnal-data-export-navigator/assets/js/main.js +++ b/assets/zip/personnal-data-export-navigator/assets/js/main.js @@ -77,6 +77,7 @@ xhr.onload = function(){ ApplyFriendsList(); ApplyPosts(); ApplyCommentsList(); + ApplyUserLikes(); } xhr.send(null); \ No newline at end of file