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