Remove useless console logs

This commit is contained in:
amcmanu3 2022-06-03 15:53:12 -04:00
parent 6eb3e541bf
commit 0200f1caec

View File

@ -450,9 +450,7 @@
var ctxmenuName = e.target.getAttribute('data-name'); var ctxmenuName = e.target.getAttribute('data-name');
document.getElementById('context-title').innerHTML = ctxmenuName; document.getElementById('context-title').innerHTML = ctxmenuName;
console.log(ctxmenuName);
if (!ctxmenuPath) { if (!ctxmenuPath) {
console.log({ 'event.target': e.target, ctxmenuPath });
return; return;
} }
$('#renameItem').show(); $('#renameItem').show();
@ -466,7 +464,6 @@
var isFile = e.target.classList.contains('tree-file'); var isFile = e.target.classList.contains('tree-file');
$('#deleteFile').toggle(isFile); $('#deleteFile').toggle(isFile);
$('#downloadFile').toggle(isFile); $('#downloadFile').toggle(isFile);
console.log({ 'event.target': e.target, isDir, isFile });
if (e.target.classList.contains('root-dir')) { if (e.target.classList.contains('root-dir')) {
$('#createFile').show(); $('#createFile').show();
@ -479,7 +476,6 @@
} }
if (e.target.textContent.endsWith('.zip')) { if (e.target.textContent.endsWith('.zip')) {
$('#unzip').show(); $('#unzip').show();
console.log(e.target.textContent)
} else { } else {
$('#unzip').hide(); $('#unzip').hide();
} }
@ -502,7 +498,6 @@
} }
document.getElementById("files-tree-nav").style.top = clientY + 'px'; document.getElementById("files-tree-nav").style.top = clientY + 'px';
document.getElementById("files-tree-nav").style.left = clientX + 'px'; document.getElementById("files-tree-nav").style.left = clientX + 'px';
console.log(window.innerHeight)
timer = null; timer = null;
}; };
} }
@ -585,7 +580,6 @@
console.log("got response:"); console.log("got response:");
document.getElementById("save_status").innerHTML = '<i class="fal fa-file-check"></i>'; document.getElementById("save_status").innerHTML = '<i class="fal fa-file-check"></i>';
document.getElementById('save_status').style.color = '#2fb689'; document.getElementById('save_status').style.color = '#2fb689';
console.log(data);
}, },
}); });
} }
@ -602,7 +596,6 @@
}, },
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data);
callback(); callback();
}, },
}); });
@ -620,7 +613,6 @@
}, },
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data);
callback(); callback();
}, },
}); });
@ -638,7 +630,6 @@
}, },
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data);
callback(); callback();
}, },
}); });
@ -656,7 +647,6 @@
}, },
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data);
callback(); callback();
}, },
}); });
@ -673,13 +663,13 @@
}, },
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data);
callback(); callback();
}, },
}); });
} }
function unZip(path, callback) { function unZip(path, callback) {
console.log('path: ', path)
var token = getCookie("_xsrf") var token = getCookie("_xsrf")
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -731,7 +721,6 @@
function uploadFilesE(event) { function uploadFilesE(event) {
path = event.target.parentElement.getAttribute('data-path'); path = event.target.parentElement.getAttribute('data-path');
console.log("PATH: " + path);
$(function () { $(function () {
var uploadHtml = "<div>" + var uploadHtml = "<div>" +
'<form id="upload_file" enctype="multipart/form-data">' + "<label class='upload-area' style='width:100%;text-align:center;' for='files'>" + '<form id="upload_file" enctype="multipart/form-data">' + "<label class='upload-area' style='width:100%;text-align:center;' for='files'>" +
@ -805,7 +794,8 @@
var fileList = document.getElementById("files"); var fileList = document.getElementById("files");
fileList.addEventListener("change", function (e) { fileList.addEventListener("change", function (e) {
var list = ""; var list = "";
this.files.forEach(file => { let files = Array.from(this.files)
files.forEach(file => {
list += "<li class='col-xs-12 file-list'>" + file.name + "</li>" list += "<li class='col-xs-12 file-list'>" + file.name + "</li>"
}) })
@ -823,7 +813,6 @@
dataType: 'text', dataType: 'text',
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data);
dataArr = data.split('\n'); dataArr = data.split('\n');
serverDir = dataArr.shift(); // Remove & return first element (server directory) serverDir = dataArr.shift(); // Remove & return first element (server directory)
@ -900,7 +889,7 @@
} }
function setTreeViewContext() { function setTreeViewContext() {
var treeItems = document.getElementsByClassName('tree-ctx-item'); var treeItems = Array.from(document.getElementsByClassName('tree-ctx-item'));
treeItems.forEach(item => { treeItems.forEach(item => {
if ([ if ([
@ -933,12 +922,10 @@
$('#upload').toggle(isDir); $('#upload').toggle(isDir);
document.getElementById('context-title').innerHTML = ctxmenuName; document.getElementById('context-title').innerHTML = ctxmenuName;
console.log(ctxmenuName);
var isFile = event.target.classList.contains('tree-file'); var isFile = event.target.classList.contains('tree-file');
$('#deleteFile').toggle(isFile); $('#deleteFile').toggle(isFile);
$('#downloadFile').toggle(isFile); $('#downloadFile').toggle(isFile);
console.log({ 'event.target': event.target, isDir, isFile });
if (event.target.classList.contains('root-dir')) { if (event.target.classList.contains('root-dir')) {
$('#createFile').show(); $('#createFile').show();
@ -951,7 +938,6 @@
} }
if (event.target.textContent.endsWith('.zip')) { if (event.target.textContent.endsWith('.zip')) {
$('#unzip').show(); $('#unzip').show();
console.log(event.target.textContent)
} else { } else {
$('#unzip').hide(); $('#unzip').hide();
} }
@ -972,8 +958,6 @@
} }
document.getElementById("files-tree-nav").style.top = clientY + 'px'; document.getElementById("files-tree-nav").style.top = clientY + 'px';
document.getElementById("files-tree-nav").style.left = clientX + 'px'; document.getElementById("files-tree-nav").style.left = clientX + 'px';
console.log(domRect)
console.log(window.innerHeight)
}) })
}) })
} }
@ -1047,6 +1031,7 @@
} }
function unzipFilesE(event) { function unzipFilesE(event) {
path = event.target.parentElement.getAttribute('data-path'); path = event.target.parentElement.getAttribute('data-path');
console.log(path)
unZip(path) unZip(path)
} }