mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-21 05:15:17 +00:00
Display user movies.
This commit is contained in:
@ -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:
|
||||
"<td>" + movie.id + "</td>" +
|
||||
"<td>" + movie.name + "</td>" +
|
||||
"<td>" + movie.file_type + "</td>" +
|
||||
"<td>" + movie.size + "</td>" +
|
||||
"<td> <a href='"+getFilePathFromURL(movie.url)+"'>Open</a></td>"
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -79,6 +79,7 @@ xhr.onload = function(){
|
||||
ApplyCommentsList();
|
||||
ApplyUserLikes();
|
||||
ApplySurveyResponses();
|
||||
ApplyMovies();
|
||||
}
|
||||
|
||||
xhr.send(null);
|
Reference in New Issue
Block a user