mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Appease sonar
This commit is contained in:
parent
6158ea85b5
commit
9b7d0d83b5
@ -20,11 +20,9 @@ function getDirView(event = false) {
|
||||
console.log("Well that failed");
|
||||
}
|
||||
} else if ($("#root_files_button").hasClass("clicked")) {
|
||||
path = $("#zip_server_path").val();
|
||||
getTreeView(path, true);
|
||||
getTreeView($("#zip_server_path").val(), true);
|
||||
} else {
|
||||
path = $("#file-uploaded").val();
|
||||
getTreeView(path, true, true);
|
||||
getTreeView($("#file-uploaded").val(), true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,8 +98,8 @@
|
||||
function updateAnnouncements(data) {
|
||||
console.log(data)
|
||||
let text = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
text += `<li class="card-header header-sm justify-content-between align-items-center" id="${data[i].id}"><p style="float: right;"><i data-id="${data[i].id}"class="clear-button fa-regular fa-x"></i></p><a style="color: var(--purple);" href=${data[i].link} target="_blank"><h6>${data[i].title}</h6><small><p>${data[i].date}</p></small><p>${data[i].desc}</p></li></a>`
|
||||
for (let value of data) {
|
||||
text += `<li class="card-header header-sm justify-content-between align-items-center" id="${value.id}"><p style="float: right;"><i data-id="${value.id}"class="clear-button fa-regular fa-x"></i></p><a style="color: var(--purple);" href=${value.link} target="_blank"><h6>${value.title}</h6><small><p>${value.date}</p></small><p>${value.desc}</p></li></a>`
|
||||
}
|
||||
if (data.length > 0) {
|
||||
localStorage.setItem("notif-count", data.length);
|
||||
|
@ -201,8 +201,8 @@
|
||||
let responseData = await res.json();
|
||||
let html = ``
|
||||
if (responseData.status === "ok") {
|
||||
for (let i = 0; i < responseData.data.length; i++) {
|
||||
html += `<span class='box'>${responseData.data[i]}<br /></span>`
|
||||
for (let value of responseData.data) {
|
||||
html += `<span class='box'>${value}<br /></span>`
|
||||
}
|
||||
console.log('Got Log From Server')
|
||||
$('#virt_console').html(html);
|
||||
|
@ -240,8 +240,8 @@
|
||||
let responseData = await res.json();
|
||||
let html = ``
|
||||
if (responseData.status === "ok") {
|
||||
for (let i = 0; i < responseData.data.length; i++) {
|
||||
html += `<span class='box'>${responseData.data[i]}<br /></span>`
|
||||
for (let value of responseData.data) {
|
||||
html += `<span class='box'>${value}<br /></span>`
|
||||
}
|
||||
console.log('Got Log From Server')
|
||||
$('#virt_console').html(html);
|
||||
@ -385,7 +385,6 @@
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
let scrolled = false;
|
||||
$('#virt_console').on('scroll', chkScroll);
|
||||
$('#to-bottom').on('click', scrollToBottom)
|
||||
});
|
||||
|
@ -890,7 +890,6 @@
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
let doUpload = false;
|
||||
}
|
||||
}, false);
|
||||
xmlHttpRequest.addEventListener('error', (e) => {
|
||||
@ -1198,7 +1197,7 @@
|
||||
let idx = document.getElementById('server_type').selectedIndex;
|
||||
// get the value of the selected option
|
||||
let cSelect = document.getElementById("server");
|
||||
let which;
|
||||
let which = {};
|
||||
try {
|
||||
which = document.getElementById('server_type').options[idx].value;
|
||||
} catch {
|
||||
@ -1234,10 +1233,10 @@
|
||||
}
|
||||
|
||||
function serverJarChange(selectObj) {
|
||||
let type_select = document.getElementById('server_jar')
|
||||
let tidx = type_select.selectedIndex;
|
||||
let val = type_select.options[tidx].value;
|
||||
let jcSelect = "";
|
||||
const type_select = document.getElementById('server_jar')
|
||||
const tidx = type_select.selectedIndex;
|
||||
const val = type_select.options[tidx].value;
|
||||
let jcSelect = {};
|
||||
if (val == 'None') {
|
||||
jcSelect = document.getElementById("server_type");
|
||||
while (jcSelect.options.length > 0) {
|
||||
@ -1251,7 +1250,7 @@
|
||||
// get the value of the selected option
|
||||
let jwhich = selectObj.options[jidx].value;
|
||||
// use the selected option value to retrieve the list of items from the serverTypesLists array
|
||||
jcList = Object.keys(serverTypesLists[jwhich]);
|
||||
let jcList = Object.keys(serverTypesLists[jwhich]);
|
||||
// get the country select element via its known id
|
||||
jcSelect = document.getElementById("server_type");
|
||||
// remove the current options from the country select
|
||||
|
Loading…
x
Reference in New Issue
Block a user