From f9c1f37ac6b1ec6ae0186ce3f8cc034265a10873 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 15 Jan 2019 07:17:06 +0100 Subject: [PATCH] Display user movies. --- .../Export.html | 26 +++++++++++++++- .../assets/js/categories/movies.js | 30 +++++++++++++++++++ .../assets/js/main.js | 1 + 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 assets/zip/personnal-data-export-navigator/assets/js/categories/movies.js diff --git a/assets/zip/personnal-data-export-navigator/Export.html b/assets/zip/personnal-data-export-navigator/Export.html index 0c6c3bc3..109e9710 100644 --- a/assets/zip/personnal-data-export-navigator/Export.html +++ b/assets/zip/personnal-data-export-navigator/Export.html @@ -169,8 +169,31 @@ +
- Loading movies + +

Your movies

+ + + + + + + + + + + + + + + + + + + +
NumberNameFile typeFile sizeActions
+
@@ -193,6 +216,7 @@ + \ No newline at end of file diff --git a/assets/zip/personnal-data-export-navigator/assets/js/categories/movies.js b/assets/zip/personnal-data-export-navigator/assets/js/categories/movies.js new file mode 100644 index 00000000..e5580fa8 --- /dev/null +++ b/assets/zip/personnal-data-export-navigator/assets/js/categories/movies.js @@ -0,0 +1,30 @@ +/** + * Movies category + * + * @author Pierre HUBERT + */ + +/** + * Apply the list of movies of the user + */ +function ApplyMovies(){ + + let target = document.querySelector("#full-movie-list-table tbody"); + + //Process the list of movies + data.movies.forEach(movie => { + + createElem2({ + appendTo: target, + type: "tr", + innerHTML: + "" + movie.id + "" + + "" + movie.name + "" + + "" + movie.file_type + "" + + "" + movie.size + "" + + " Open" + }); + + }); + +} \ 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 a809a061..6f4cbe67 100644 --- a/assets/zip/personnal-data-export-navigator/assets/js/main.js +++ b/assets/zip/personnal-data-export-navigator/assets/js/main.js @@ -79,6 +79,7 @@ xhr.onload = function(){ ApplyCommentsList(); ApplyUserLikes(); ApplySurveyResponses(); + ApplyMovies(); } xhr.send(null); \ No newline at end of file