diff --git a/assets/css/styles.css b/assets/css/styles.css
new file mode 100644
index 00000000..9b78b59e
--- /dev/null
+++ b/assets/css/styles.css
@@ -0,0 +1,474 @@
+* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ /*outline: 1px solid;*/
+ font-family: Verdana, Geneva, Tahoma, sans-serif;
+ font-size: 14px;
+}
+
+body {
+ height: 100vh;
+ width: 100vw;
+}
+
+header {
+ display: flex;
+ /* justify-content: space-between; */
+ width: 100%;
+ height: 60px;
+ background-color: rgb(255, 255, 255);
+ box-shadow: 0px -7px 20px 0px black;
+ z-index: 29;
+}
+
+.headerLeft {
+ width: 14%;
+ height: inherit;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.headerLeft > img {
+ height: inherit;
+}
+.headerCenter {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 65%;
+ height: inherit;
+}
+
+.searchBar {
+ background-color: rgba(216, 216, 216, 0.6);
+ height: 60%;
+ width: 95%;
+ border: none;
+ border-radius: 28px;
+ padding: 0.5rem 1.5rem;
+ outline: none;
+}
+
+.headerRight {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ width: 21%;
+ height: inherit;
+}
+
+.icon {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ height: 50%;
+ width: 50%;
+ font-size: 1.5rem;
+}
+.iconUser {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ height: 50%;
+ width: 50%;
+}
+
+main {
+ display: flex;
+ justify-content: space-between;
+ height: calc(100% - 60px);
+ width: 100%;
+ z-index: 20;
+}
+
+.mainLeft {
+ width: 14%;
+ height: auto;
+ background-color: rgba(177, 201, 214, 0.4);
+}
+.newFile {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 0.5rem;
+ padding: 1rem;
+}
+.newFile__btn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-top: 4px solid #3acfd5;
+ border-left: 4px solid #3aa9d5;
+ border-bottom: 4px solid #3a4ed5;
+ border-right: 4px solid #3a82d5;
+ background-color: white;
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ cursor: pointer;
+}
+.newFile__btn > span {
+ width: 45px;
+ height: 50px;
+ padding: 0.4rem;
+ text-align: center;
+ font-size: 2rem;
+ font-weight: bold;
+}
+
+#newOptionsPanelBackground {
+ position: absolute;
+ display: none;
+ z-index: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.newOptions {
+ display: none;
+ padding: 0.2rem 0.8rem;
+ position: absolute;
+ top: 17%;
+ left: 8%;
+ z-index: 1;
+ width: 26%;
+ height: auto;
+ background-color: white;
+ border-radius: 5px;
+ box-shadow: 6px 3px 20px 0px black;
+}
+
+.createFolderPanel {
+ display: none;
+ padding: 0.2rem 0.8rem;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ z-index: 1;
+ width: 15%;
+ height: auto;
+ background-color: white;
+ border-radius: 5px;
+ box-shadow: 6px 3px 20px 0px rgb(65, 64, 64);
+}
+
+.createFolderHeader {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+#closeCreateFolderBtn {
+ cursor: pointer;
+}
+
+.createFolderFormTitle {
+ margin: 0.8rem 0;
+}
+
+.newFolderInput {
+ width: 100%;
+}
+
+.buttons {
+ margin: 8px 0;
+ display: flex;
+ justify-content: flex-start;
+ width: 100%;
+}
+
+.createFolderPanelBtn {
+ margin-right: 8px;
+ width: 40%;
+ color: white;
+ padding: 5px;
+ border: 1px solid rgb(194, 194, 194);
+ cursor: pointer;
+}
+
+.submit {
+ background-color: rgb(71, 111, 196);
+}
+
+.cancel {
+ background-color: rgb(196, 86, 71);
+}
+
+#createFolderBackground {
+ position: absolute;
+ display: none;
+ z-index: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.7);
+}
+.optionWrapper {
+ display: flex;
+ margin: 0.5rem 0;
+}
+.panelBtn {
+ display: flex;
+ width: 100%;
+ background-color: transparent;
+ border: none;
+ font-size: 16px;
+}
+
+.optionIconWrapper {
+ width: 12%;
+ margin-right: 0.4rem;
+}
+
+.fdContainer {
+ display: flex;
+ flex-direction: column;
+ align-items: left;
+ justify-content: center;
+ padding: 1rem;
+}
+.mainCenter {
+ padding: 0 1.5rem;
+ display: flex;
+ flex-direction: column;
+ width: 65%;
+ height: auto;
+}
+
+.fileWrapper {
+ display: flex;
+ flex-direction: row;
+ align-items: flex-start;
+ justify-content: center;
+ width: 100%;
+ border-bottom: 0.5px solid;
+ border-bottom-color: rgb(197, 197, 197);
+}
+.fileWrapperDelete {
+ display: flex;
+ flex-direction: row;
+ align-items: left;
+ justify-content: center;
+ width: 100%;
+ padding: 1rem 1.8rem;
+}
+.icon__delete {
+ display: flex;
+ margin-left: 2px;
+ text-decoration: none;
+ color: black;
+ font-weight: bold;
+}
+.icon__delete:visited {
+ display: flex;
+ margin-left: 2px;
+ text-decoration: none;
+ color: black;
+ font-weight: bold;
+}
+.icon__delete:hover {
+ display: flex;
+ margin-left: 2px;
+ text-decoration: none;
+ color: black;
+ font-weight: bold;
+}
+.render__route {
+ display: flex;
+ margin-left: 2px;
+ text-decoration: none;
+ color: black;
+ font-weight: bold;
+}
+.render__route:visited {
+ display: flex;
+ text-decoration: none;
+ color: black;
+}
+.render__route:hover {
+ display: flex;
+ text-decoration: none;
+ color: black;
+}
+.renderUpdateLink {
+ display: flex;
+ width: 100%;
+ text-decoration: none;
+ color: black;
+}
+
+.renderUpdateLink:visited {
+ display: flex;
+ width: 100%;
+ text-decoration: none;
+ color: black;
+}
+
+.renderUpdateLink:hover {
+ display: flex;
+ width: 100%;
+ text-decoration: none;
+ color: black;
+}
+
+.mainCenter__fileIcon {
+ width: 4%;
+}
+
+.mainCenter__fileName {
+ width: 96%;
+}
+.mainCenter__route {
+ width: 100%;
+ padding: 1rem;
+ display: flex;
+ flex-direction: row;
+ align-items: flex-start;
+ border-bottom: 0.5px solid;
+ border-bottom-color: rgb(197, 197, 197);
+}
+
+.fileDirOptions {
+ display: none;
+ padding: 0.2rem 0.8rem;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ width: 10%;
+ height: auto;
+ background-color: white;
+ border-radius: 5px;
+ box-shadow: 6px 3px 20px 0px rgb(65, 64, 64);
+}
+
+.invisibleInput {
+ display: none;
+}
+
+.mainRight {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 21%;
+ height: auto;
+ background-color: rgba(177, 201, 214, 0.4);
+}
+
+.mainRight__fileHeader {
+ padding: 1rem;
+ margin-top: 2rem;
+ margin-bottom: 2rem;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-around;
+ width: 100%;
+}
+.mainRight__fileIcon {
+ width: 4%;
+ font-size: 3rem;
+}
+
+.mainRight__fileName {
+ width: auto;
+}
+hr {
+ height: 0.2%;
+ width: 100%;
+ background-color: rgb(255, 255, 255);
+}
+.fileInfoContainer {
+ padding: 1rem;
+ width: 100%;
+ height: calc(100% - 20px);
+}
+.fileInfoContainer2 {
+ padding: 1rem;
+ width: 100%;
+ height: calc(100% - 20px);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: flex-start;
+}
+.fileInfoWrapper {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
+ flex-wrap: nowrap;
+ width: 100%;
+}
+
+/* PRUEBA LISTA DERECHA */
+.mainLeft__fileIcon {
+ display: flex;
+ margin-right: 6px;
+}
+
+.mainLeft__container {
+ width: inherit;
+ display: flex;
+ align-items: start;
+}
+
+.mainLeft__fileName {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.prueba {
+ display: flex;
+ flex: 10 10 auto;
+}
+
+.space {
+ padding: 0.8rem;
+}
+
+.clickMe {
+ padding: 0.8rem;
+}
+
+.renderFileSection {
+ display: none;
+}
+.renderFileContainer {
+ margin: 0 auto 0 0;
+ padding: 1rem;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ /* top: 50%;
+ left: 50%; */
+ z-index: 1;
+ width: 600px;
+ height: auto;
+ background-color: white;
+ border-radius: 20px;
+}
+
+.renderImgFile {
+ width: 100%;
+ height: inherit;
+ border-radius: 20px;
+}
+
+.renderAudioFile {
+ width: inherit;
+ height: 54px;
+ border-radius: 20px;
+}
+
+.renderVideoFile {
+ width: 100%;
+ height: inherit;
+ border-radius: 20px;
+}
diff --git a/assets/img/logo.png b/assets/img/logo.png
new file mode 100644
index 00000000..3fc46535
Binary files /dev/null and b/assets/img/logo.png differ
diff --git a/includes/createFolder.php b/includes/createFolder.php
new file mode 100644
index 00000000..b695b2f3
--- /dev/null
+++ b/includes/createFolder.php
@@ -0,0 +1,61 @@
+";
+
+ // Getting all dir items
+ $dirItemList = scandir($folderUploadDir);
+ $dirItemList = array_diff($dirItemList, array('.', '..'));
+ print_r($dirItemList); echo "
";
+
+ //Checking if folderName already exists and changing its value if so
+ foreach ($dirItemList as $dirItem){
+ if($dirItem === $folderName){
+
+ if(!strrpos($dirItem, ".", 0)){
+ echo "I'm in and \$dirItem is --> ".$dirItem."
";
+
+ if(strrpos($dirItem, "Copy", 0)){
+ $copyIndexString = (end(explode("Copy", $dirItem)));
+ echo "\$copyIndexString --> ".$copyIndexString."
";
+
+ if(empty($copyIndexString)){
+ $copyIndex = 1;
+ $newCopyIndex = (string)($copyIndex);
+
+ }else{
+ $copyIndex = (int)$copyIndexString;
+ $copyIndex +=1;
+ $newCopyIndex = (string)($copyIndex);
+
+ }
+ $folderName = str_replace("Copy".$copyIndexString, "Copy".$newCopyIndex, $folderName);
+ echo "new \$folderName -->".$folderName."
";
+
+ }else{
+ $folderName.="Copy";
+ echo "new \$folderName -->".$folderName."
";
+ }
+ }
+ }
+
+ }
+
+ // Completing directory path
+ $finalDirectoryPath = $folderUploadDir."/".$folderName;
+
+ // Create new folder permissions (0777 means everything allowed)
+ mkdir($finalDirectoryPath, 0777);
+
+ header("Location: ../index.php?foldercreationsuccess");
+ }
+
+?>
\ No newline at end of file
diff --git a/includes/delete.php b/includes/delete.php
new file mode 100644
index 00000000..01831e2e
--- /dev/null
+++ b/includes/delete.php
@@ -0,0 +1,25 @@
+";
+ break;
+ case 'csv':
+ $icon = "
";
+ break;
+ case 'jpg':
+ $icon = "
";
+ break;
+ case 'png':
+ $icon = "
";
+ break;
+ case 'txt':
+ $icon = "
";
+ break;
+ case 'ppt':
+ $icon = "
";
+ break;
+ case 'odt':
+ $icon = "
";
+ break;
+ case 'pdf':
+ $icon = "
";
+ break;
+ case 'zip':
+ $icon = "
";
+ break;
+ case 'rar':
+ $icon = "
";
+ break;
+ case 'exe':
+ $icon = "
";
+ break;
+ case 'svg':
+ $icon = "
";
+ break;
+ case 'mp3':
+ $icon = "
";
+ break;
+ case 'mp4':
+ $icon = "
";
+ break;
+ default:
+ $icon = "
";
+ }
+
+ if(is_dir($dirPath."/".$fileName)){
+
+ echo "
+
+ ";
+
+ }else{
+
+ echo "
+
+ ";
+
+ }
+ }
+ }
+
+ function renderItemListLeft($dirPath, $dirPathItemList){
+ for($i=2; $i
+
+
+ ".$fileName."
+
+
+ ";
+ }
+ }
+ }
+?>
+
+
\ No newline at end of file
diff --git a/includes/openFile.php b/includes/openFile.php
new file mode 100644
index 00000000..b89eba6c
--- /dev/null
+++ b/includes/openFile.php
@@ -0,0 +1,67 @@
+ $nameData,
+ "extension" => $extensionData,
+ "objectDirPath" => $localDirPath.$file,
+ ];
+ echo json_encode($arrayData);
+ }
+ }
+ }
+
+ }
+ closedir($dh);
+ }else
+ echo "
No es ruta valida";
+}
+
+dblClick($ruta);
+
+// else{
+// $nameData = $file;
+// $dateData = date("d/m/Y", filemtime($ruta."/".$Name));
+// $modificationData = date("d/m/Y", fileatime($ruta."/".$Name));
+// $sizeData = "null";
+// $extensionData = "null";
+// $arrayData = [
+// "name" => $nameData,
+// "dataCreation" => $dateData,
+// "modification" => $modificationData,
+// "size" => $sizeData,
+// "extension" => $extensionData,
+// ];
+// echo json_encode($arrayData);
+// }
+?>
diff --git a/includes/showData.php b/includes/showData.php
new file mode 100644
index 00000000..497f0cc8
--- /dev/null
+++ b/includes/showData.php
@@ -0,0 +1,54 @@
+ $nameData,
+ "dataCreation" => $dateData,
+ "modification" => $modificationData,
+ "size" => $sizeData,
+ "extension" => $extensionData,
+ ];
+ echo json_encode($arrayData);
+ }else{
+ $nameData = $file;
+ $dateData = date("d/m/Y", filemtime($ruta."/".$Name));
+ $modificationData = date("d/m/Y", fileatime($ruta."/".$Name));
+ $sizeData = "null";
+ $extensionData = "null";
+ $arrayData = [
+ "name" => $nameData,
+ "dataCreation" => $dateData,
+ "modification" => $modificationData,
+ "size" => $sizeData,
+ "extension" => $extensionData,
+ ];
+ echo json_encode($arrayData);
+ }
+ }
+
+ }
+ closedir($dh);
+
+ }else
+ echo "
No es ruta valida";
+}
+listar_directorios_ruta($ruta);
\ No newline at end of file
diff --git a/includes/updateDir.php b/includes/updateDir.php
new file mode 100644
index 00000000..4031960c
--- /dev/null
+++ b/includes/updateDir.php
@@ -0,0 +1,21 @@
+";
+ $_SESSION['currentPath'] = $_SESSION['base_url'] . "/root";
+ $_SESSION['mainRootPath'] = $_SESSION['base_url'] . "/root";
+
+ }else if(isset($_GET['updateDir'])){
+
+ $_SESSION['currentPath'] = $_GET['updateDir'];
+ header("Location: ../index.php");
+ }
+
+ // echo $_SESSION['currentPath'];
+ // echo "I am the main root path --> ".$_SESSION['mainRootPath'];
+
+?>
\ No newline at end of file
diff --git a/includes/updateDirNavBar.php b/includes/updateDirNavBar.php
new file mode 100644
index 00000000..6dae0c17
--- /dev/null
+++ b/includes/updateDirNavBar.php
@@ -0,0 +1,34 @@
+
+ My Unity
+ ";
+ //
+
+ // Aux variable for dir path
+ $hrefDirPath = "/";
+
+ for($i = $startIndexNavbar; $i < sizeof($splitMainPath); $i++){
+
+ // Rendering NavBar in relation to Main path
+ $hrefDirPath = $hrefDirPath.$splitMainPath[$i];
+ // $hrefDirPath = $hrefDirPath.$splitMainPath[$i]."/";
+ echo "
+ /".
+ $splitMainPath[$i]."
+ ";
+
+ $hrefDirPath = $hrefDirPath."/";
+ }
+
+ }
+
+?>
\ No newline at end of file
diff --git a/includes/updateName.php b/includes/updateName.php
new file mode 100644
index 00000000..12fd3050
--- /dev/null
+++ b/includes/updateName.php
@@ -0,0 +1,70 @@
+
\ No newline at end of file
diff --git a/includes/uploadFile.php b/includes/uploadFile.php
new file mode 100644
index 00000000..cef1ef27
--- /dev/null
+++ b/includes/uploadFile.php
@@ -0,0 +1,79 @@
+
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 00000000..9a05eee4
--- /dev/null
+++ b/index.php
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ".
+ renderDirBrowsingNavBar().
+ "
";
+ // My Unity
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
Aún no tienes ningún elemento seleccionado, para saber su información, debes seleccionarlo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/formValidation.js b/js/formValidation.js
new file mode 100644
index 00000000..d8c8ebb5
--- /dev/null
+++ b/js/formValidation.js
@@ -0,0 +1,60 @@
+// Rename Validation
+function renameValidation() {
+ let currentName = document.forms["renameForm"]["oldName"].value;
+ let newName = document.forms["renameForm"]["newName"].value;
+ let allowedExtensions = [
+ "doc",
+ "csv",
+ "jpg",
+ "png",
+ "txt",
+ "ppt",
+ "odt",
+ "pdf",
+ "zip",
+ "rar",
+ "exe",
+ "svg",
+ "mp3",
+ "mp4",
+ ];
+
+ if (currentName === newName) {
+ alert("The new name needs to be different to the current name");
+ return false;
+ } else if (currentName !== newName && currentName.indexOf(".") > -1) {
+ let splitCurrentName = currentName.split(".");
+ let splitNewName = newName.split(".");
+
+ if (
+ splitCurrentName[splitCurrentName.length - 1] !==
+ splitNewName[splitNewName.length - 1]
+ ) {
+ alert("The file extension cannot be changed");
+ return false;
+ } else {
+ return true;
+ }
+ } else if (currentName !== newName && currentName.indexOf(".") === -1) {
+ if (newName.indexOf(".") > -1) {
+ let splitNewFolderName = newName.split(".");
+ let unnecessaryExtension = false;
+
+ for (let i = 0; i < allowedExtensions.length; i++) {
+ if (
+ splitNewFolderName[splitNewFolderName.length - 1] ===
+ allowedExtensions[i]
+ ) {
+ unnecessaryExtension = true;
+ }
+ }
+ if (unnecessaryExtension === true) {
+ alert("A folder does not need an extension");
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return true;
+ }
+}
diff --git a/js/fuctionOnClick.js b/js/fuctionOnClick.js
new file mode 100644
index 00000000..0477d297
--- /dev/null
+++ b/js/fuctionOnClick.js
@@ -0,0 +1,123 @@
+/*$( "#target" ).dblclick(function() {
+ alert( "Handler for .dblclick() called." );
+});*/
+
+function handleEvents() {
+ /* Click event */
+
+ document.addEventListener("click", (e) => {
+ // console.log("estoy dentro pero no hago el click");
+ if (e.target.matches(".clickMe>*")) {
+ var prueba = e.target.dataset.id;
+ var formId = new FormData();
+ formId.append("prueba", prueba);
+ $.ajax({
+ type: "POST",
+ url: "includes/showData.php",
+ data: formId,
+ dataType: "json",
+ //asycn:false,
+ cache: false,
+ contentType: false,
+ processData: false,
+ success: function (data) {
+ // console.log(data);
+ if (data === null) {
+ } else {
+ //$("#name").remove();
+ $("#icon").hide();
+ let iconClass = "";
+
+ if (data.size == "null" && data.extension == "null") {
+ $("#infoContainer").hide();
+ $("#container").show();
+ $("#labelCreate").show();
+ $("#labelName").show();
+ $("#dateCreation").show();
+ $("#labelModification").show();
+ $("#labelSize").hide();
+ $("#labelExtension").hide();
+ $("#size").hide();
+ $("#extension").hide();
+ $("#titleName").text(data.name);
+ $("#name").text(data.name);
+ $("#dateCreation").text(data.dataCreation);
+ $("#modification").text(data.modification);
+ iconClass = "bi bi-folder-fill";
+ $("#iconTitle").attr("class", iconClass);
+ $("#iconTitle").show();
+ }
+ if (data.size !== "null" && data.extension !== "null") {
+ $("#infoContainer").hide();
+ $("#container").show();
+ $("#labelName").show();
+ $("#labelCreate").show();
+ $("#dateCreation").show();
+ $("#labelModification").show();
+ $("#labelSize").show();
+ $("#labelExtension").show();
+ $("#size").show();
+ $("#extension").show();
+ $("#titleName").text(data.name);
+ $("#name").text(data.name);
+ $("#dateCreation").text(data.dataCreation);
+ $("#modification").text(data.modification);
+ $("#size").text(data.size);
+ $("#extension").text(data.extension);
+ // Choosing file extension icon to render
+ switch (data.extension) {
+ case ".doc":
+ iconClass = "bi bi-file-word-fill";
+ break;
+ case ".csv":
+ iconClass = "bi bi-file-excel-fill";
+ break;
+ case ".jpg":
+ iconClass = "bi bi-file-image-fill";
+ break;
+ case ".png":
+ iconClass = "bi bi-file-image-fill";
+ break;
+ case ".txt":
+ iconClass = "bi bi-file-text-fill";
+ break;
+ case ".ppt":
+ iconClass = "bi bi-file-ppt-fill";
+ break;
+ case ".odt":
+ iconClass = "bi bi-file-word-fill";
+ break;
+ case ".pdf":
+ iconClass = "bi bi-file-pdf-fill";
+ break;
+ case ".zip":
+ iconClass = "bi bi-file-zip-fill";
+ break;
+ case ".rar":
+ iconClass = "bi bi-file-zip-fill";
+ break;
+ case ".exe":
+ iconClass = "bi bi-file-code-fill";
+ break;
+ case ".svg":
+ iconClass = "bi bi-file-image-fill";
+ break;
+ case ".mp3":
+ iconClass = "bi bi-file-music-fill";
+ break;
+ default:
+ iconClass = "bi bi-file-play-fill";
+ break;
+ }
+
+ $("#iconTitle").attr("class", iconClass);
+ $("#iconTitle").show();
+ }
+ }
+ },
+ });
+ }
+ });
+}
+
+handleEvents();
diff --git a/js/functionOnDblCick.js b/js/functionOnDblCick.js
new file mode 100644
index 00000000..494add46
--- /dev/null
+++ b/js/functionOnDblCick.js
@@ -0,0 +1,57 @@
+function handleDblClickEvents() {
+ document.addEventListener("dblclick", (e) => {
+ if (e.target.matches(".clickMe>*")) {
+ let filename = e.target.dataset.id;
+ let formDbl = new FormData();
+ console.log("filename--> ", filename);
+ formDbl.append("filename", filename);
+ $.ajax({
+ type: "POST",
+ url: "includes/openFile.php",
+ data: formDbl,
+ dataType: "json",
+ //asycn:false,
+ cache: false,
+ contentType: false,
+ processData: false,
+ success: function (data) {
+ if (data === null) {
+ console.log("Something went wrong.");
+ } else {
+ console.log("data.objectDirPath --> ", data.objectDirPath);
+ if (
+ data.extension === "jpg" ||
+ data.extension === "png" ||
+ data.extension === "svg"
+ ) {
+ $(".renderFileSection").show();
+ $("#createFolderBackground").show();
+ $("#renderImg").attr("src", data.objectDirPath);
+ $("#renderAudio").hide();
+ $("#renderVideo").hide();
+ $("#renderImg").show();
+ } else if (data.extension === "mp3") {
+ $(".renderFileSection").show();
+ $("#createFolderBackground").show();
+ $("#renderAudio").attr("src", data.objectDirPath);
+ $("#renderImg").hide();
+ $("#renderVideo").hide();
+ $("#renderAudio").show();
+ } else if (data.extension === "mp4") {
+ $(".renderFileSection").show();
+ $("#createFolderBackground").show();
+ $("#renderVideo").attr("src", data.objectDirPath);
+ $("#renderImg").hide();
+ $("#renderAudio").hide();
+ $("#renderVideo").show();
+ console.log("data.name -->", data.name);
+ console.log("data.extension -->", data.extension);
+ }
+ }
+ },
+ });
+ }
+ });
+}
+
+handleDblClickEvents();
diff --git a/js/render.js b/js/render.js
new file mode 100644
index 00000000..3396ac56
--- /dev/null
+++ b/js/render.js
@@ -0,0 +1,103 @@
+// ------------ Global vars ---------------
+var relativeX;
+var relativeY;
+
+// ----------- Adding listeners -----------
+
+// New options panel
+$("#addNew").on("click", showNewOptions);
+$("#newOptionsPanelBackground").on("click", hideNewOptions);
+
+// Folder form panel
+$("#createFolder").on("click", showCreateFolderForm);
+$("#createFolderBackground").on("click", hideCreateFolderForm);
+$("#cancelBtnForm").on("click", hideCreateFolderForm);
+$("#closeCreateFolderBtn").on("click", hideCreateFolderForm);
+
+// Render fileDir options panel
+// $(".renderOptions").on("click", showFileDirOptions);
+// $("#newOptionsPanelBackground").on("click", hideFileDirOptions);
+
+// Rename form panel
+$(".bi-pencil-square").on("click", showRenameForm);
+$("#createFolderBackground").on("click", hideRenameForm);
+$("#closeRenameFolderBtn").on("click", hideRenameForm);
+$("#cancelRenameBtnForm").on("click", hideRenameForm);
+
+// OpenFile panel
+$("#createFolderBackground").on("click", hideOpenFile);
+
+// -------- Render Functions -----------
+function showNewOptions(event) {
+ if (
+ $("#newOptionsPanel").css("display") === "none" &&
+ event.target.id === "addNew"
+ ) {
+ $("#newOptionsPanelBackground").show();
+ $("#newOptionsPanel").show();
+ }
+}
+
+function hideNewOptions() {
+ $("#newOptionsPanel").hide();
+ $("#newOptionsPanelBackground").hide();
+}
+
+function showCreateFolderForm() {
+ $("#newOptionsPanel").hide();
+ $("#newOptionsPanelBackground").hide();
+ $("#createFolderForm").show();
+ $("#createFolderBackground").show();
+}
+
+function hideCreateFolderForm() {
+ $("#createFolderForm").hide();
+ $("#createFolderBackground").hide();
+}
+
+// function showFileDirOptions(event) {
+// getCurrentName(event);
+// // getWindowXY(event);
+// $("#fileDirOptionsPanel").css("top", relativeY);
+// $("#fileDirOptionsPanel").css("left", relativeX);
+// $("#fileDirOptionsPanel").show();
+// $("#newOptionsPanelBackground").show();
+// // console.log("$('#oldName').value -->", $("#oldName").val());
+// }
+
+// function hideFileDirOptions() {
+// $("#fileDirOptionsPanel").hide();
+// $("#newOptionsPanelBackground").hide();
+// }
+
+function showRenameForm(event) {
+ getCurrentName(event);
+ console.log("$('#oldName').value -->", $("#oldName").val());
+ $("#renamerForm").show();
+ $("#createFolderBackground").show();
+}
+
+function hideRenameForm() {
+ $("#renamerForm").hide();
+ $("#createFolderBackground").hide();
+}
+
+function hideOpenFile() {
+ $(".renderFileSection").hide();
+ $("#createFolderBackground").hide();
+}
+// --------- Other functions --------------
+// function getWindowXY(event) {
+// relativeX = event.pageX;
+// relativeY = event.pageY;
+// }
+
+function getCurrentName(event) {
+ console.log("event.target -->", event.target);
+ let notCroppedID = event.target.id;
+ let oldName = "";
+ if (notCroppedID.indexOf("Rename")) {
+ oldName = notCroppedID.replace("Rename", "");
+ }
+ $("#oldName").attr("value", oldName);
+}
diff --git a/root/Disc_profile_pic_looking_good.png b/root/Disc_profile_pic_looking_good.png
new file mode 100644
index 00000000..30ee0192
Binary files /dev/null and b/root/Disc_profile_pic_looking_good.png differ
diff --git a/root/Hola.txt b/root/Hola.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/root/WireFrame-04.jpg b/root/WireFrame-04.jpg
new file mode 100644
index 00000000..12e3231b
Binary files /dev/null and b/root/WireFrame-04.jpg differ
diff --git a/root/aaa.txt b/root/aaa.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/root/calculator-dark.jpg b/root/calculator-dark.jpg
new file mode 100644
index 00000000..91bdcadf
Binary files /dev/null and b/root/calculator-dark.jpg differ
diff --git a/root/foto.jpg b/root/foto.jpg
new file mode 100644
index 00000000..dda8f35d
Binary files /dev/null and b/root/foto.jpg differ
diff --git a/root/horse.mp3 b/root/horse.mp3
new file mode 100644
index 00000000..5d1e6a91
Binary files /dev/null and b/root/horse.mp3 differ
diff --git a/root/maxresdefault.jpg b/root/maxresdefault.jpg
new file mode 100644
index 00000000..86328a95
Binary files /dev/null and b/root/maxresdefault.jpg differ
diff --git a/root/movie.mp4 b/root/movie.mp4
new file mode 100644
index 00000000..3b468401
Binary files /dev/null and b/root/movie.mp4 differ
diff --git "a/root/mudica/rock/90/espa\303\261ola" "b/root/mudica/rock/90/espa\303\261ola"
new file mode 100644
index 00000000..e69de29b
diff --git a/root/mudica/rock/aaa b/root/mudica/rock/aaa
new file mode 100644
index 00000000..e69de29b
diff --git a/root/newFolder/receipt.JPG b/root/newFolder/receipt.JPG
new file mode 100644
index 00000000..4c8aa704
Binary files /dev/null and b/root/newFolder/receipt.JPG differ