mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
fix delete #70
This commit is contained in:
parent
d8f0dc20a4
commit
a9aaba5841
@ -140,7 +140,7 @@ webdav.move = function (oldLink, newLink) {
|
|||||||
let request = new XMLHttpRequest(),
|
let request = new XMLHttpRequest(),
|
||||||
destination = newLink.replace(baseURL + "/", webdavURL + "/");
|
destination = newLink.replace(baseURL + "/", webdavURL + "/");
|
||||||
|
|
||||||
destination = window.location.origin + destination.substring(prefixURL.length);
|
destination = window.location.origin + destination.substring(prefixURL.length);
|
||||||
|
|
||||||
request.open('MOVE', webdav.convertURL(oldLink), true);
|
request.open('MOVE', webdav.convertURL(oldLink), true);
|
||||||
request.setRequestHeader('Destination', destination);
|
request.setRequestHeader('Destination', destination);
|
||||||
@ -191,7 +191,6 @@ webdav.delete = function (link) {
|
|||||||
request.onerror = () => reject(request.statusText);
|
request.onerror = () => reject(request.statusText);
|
||||||
request.send();
|
request.send();
|
||||||
});
|
});
|
||||||
request.send();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
webdav.new = function (link) {
|
webdav.new = function (link) {
|
||||||
@ -208,7 +207,6 @@ webdav.new = function (link) {
|
|||||||
request.onerror = () => reject(request.statusText);
|
request.onerror = () => reject(request.statusText);
|
||||||
request.send();
|
request.send();
|
||||||
});
|
});
|
||||||
request.send();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * *
|
||||||
@ -222,7 +220,10 @@ function closePrompt(event) {
|
|||||||
if(!prompt)
|
if(!prompt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
event.preventDefault();
|
if(typeof event != 'undefined') {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
document.querySelector('.overlay').classList.remove('active');
|
document.querySelector('.overlay').classList.remove('active');
|
||||||
prompt.classList.remove('active');
|
prompt.classList.remove('active');
|
||||||
|
|
||||||
@ -277,7 +278,7 @@ function openEvent(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deleteOnSingleFile() {
|
function deleteOnSingleFile() {
|
||||||
closePrompt(event);
|
closePrompt();
|
||||||
buttons.setLoading('delete');
|
buttons.setLoading('delete');
|
||||||
|
|
||||||
let promises = [];
|
let promises = [];
|
||||||
@ -293,7 +294,7 @@ function deleteOnSingleFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deleteOnListing() {
|
function deleteOnListing() {
|
||||||
closePrompt(event);
|
closePrompt();
|
||||||
buttons.setLoading('delete');
|
buttons.setLoading('delete');
|
||||||
|
|
||||||
let promises = [];
|
let promises = [];
|
||||||
@ -568,4 +569,4 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|||||||
|
|
||||||
setupSearch();
|
setupSearch();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user