From 0c31a2dbe93f55ef138d258bd995faf20a10b3eb Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Tue, 23 Jan 2018 16:31:23 +0100 Subject: Relative bin/query call --- html/webbox.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'html') diff --git a/html/webbox.js b/html/webbox.js index 72ff987..47b7d78 100644 --- a/html/webbox.js +++ b/html/webbox.js @@ -57,7 +57,7 @@ function loadContents(dir) { } - xhr.open("GET", "/bin/query" + currentDir + "?command=list", true); + xhr.open("GET", "bin/query" + currentDir + "?command=list", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.send(); } @@ -325,7 +325,7 @@ function initMainpage() { initMainpage2(); } - xhrTitle.open("GET", "/bin/query?command=server-info", true); + xhrTitle.open("GET", "bin/query?command=server-info", true); xhrTitle.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhrTitle.send(); @@ -346,7 +346,7 @@ function initMainpage2() { document.getElementsByClassName("footer")[0].innerHTML = xhrFooter.responseText; } - xhrFooter.open("GET", "/bin/query?command=version", true); + xhrFooter.open("GET", "bin/query?command=version", true); xhrFooter.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhrFooter.send(); @@ -427,7 +427,7 @@ function download(filename) { filesElement.appendChild(fileElement); } - xhr.open("POST", "/bin/query" + currentDir + "?command=download-zip", true); + xhr.open("POST", "bin/query" + currentDir + "?command=download-zip", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.setRequestHeader("Content-type", "text/xml"); xhr.responseType = 'blob'; @@ -454,7 +454,7 @@ function download(filename) { dir += "/" } progressOn(); - xhr.open("GET", "/bin/query" + dir + filename, true); + xhr.open("GET", "bin/query" + dir + filename, true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.responseType = 'blob'; xhr.send(); @@ -489,7 +489,7 @@ function createDir() { dirElement.appendChild(document.createTextNode(document.getElementById("newdir").value)); - xhr.open("POST", "/bin/query" + currentDir + "?command=newdir", true); + xhr.open("POST", "bin/query" + currentDir + "?command=newdir", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.setRequestHeader("Content-type", "text/xml"); xhr.send(xmlDocument); @@ -553,7 +553,7 @@ function onUploadFile() { formData.append("uploadfile", uploadfile.files[i]); } - xhr.open("POST", "/bin/query" + currentDir + "?command=upload", true); + xhr.open("POST", "bin/query" + currentDir + "?command=upload", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.send(formData); } @@ -603,7 +603,7 @@ function deleteItems() { filesElement.appendChild(fileElement); } - xhr.open("POST", "/bin/query" + currentDir + "?command=delete", true); + xhr.open("POST", "bin/query" + currentDir + "?command=delete", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.setRequestHeader("Content-type", "text/xml"); xhr.send(xmlDocument); @@ -668,7 +668,7 @@ function move() { filesElement.appendChild(fileElement); } - xhr.open("POST", "/bin/query" + currentDir + "?command=move", true); + xhr.open("POST", "bin/query" + currentDir + "?command=move", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.setRequestHeader("Content-type", "text/xml"); xhr.send(xmlDocument); @@ -734,7 +734,7 @@ function rename() { newnameElement.appendChild(document.createTextNode(document.getElementById("renamenew").value)); filesElement.appendChild(newnameElement); - xhr.open("POST", "/bin/query" + currentDir + "?command=rename", true); + xhr.open("POST", "bin/query" + currentDir + "?command=rename", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.setRequestHeader("Content-type", "text/xml"); xhr.send(xmlDocument); @@ -782,7 +782,7 @@ function info() { filesElement.appendChild(fileElement); } - xhr.open("POST", "/bin/query" + currentDir + "?command=info", true); + xhr.open("POST", "bin/query" + currentDir + "?command=info", true); xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); xhr.setRequestHeader("Content-type", "text/xml"); xhr.send(xmlDocument); -- cgit v1.2.3