From 1237b74517ad738b2de4ba7c37535a1b622a2d80 Mon Sep 17 00:00:00 2001
From: Nicolas Paschoud <nicolas.paschoud@etu.hesge.ch>
Date: Wed, 18 Dec 2019 12:50:48 +0100
Subject: [PATCH] Little modif for frontend

---
 projet/front/show-content.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/projet/front/show-content.js b/projet/front/show-content.js
index 3c0c154..cb8518c 100644
--- a/projet/front/show-content.js
+++ b/projet/front/show-content.js
@@ -4,7 +4,7 @@ function change_path(path){
     document.getElementById("content-drive").innerHTML = "";
     $.ajax({url: 'change-path'+path, success: function(result){
         console.log(result);
-        document.getElementById("dir_name").innerHTML = "Directory : " + path;
+        appendLinkToParent(path, result[0].parent);
         for (let i in result){
             if (result[i].file_id){
                 new_file(result[i].file_name, result[i].file_id);
@@ -18,6 +18,14 @@ function change_path(path){
     }});
 }
 
+function appendLinkToParent(path, parent){
+    let el = document.getElementById("dir_name");
+    el.innerHTML = `
+        Directory : ${path}
+    `;
+
+}
+
 function login() {
     let username = document.getElementById("username").value
     let passwd = document.getElementById("passwd").value
-- 
GitLab