mirror of
https://github.com/neocities/neocities.git
synced 2025-08-18 07:13:50 +02:00
Merge 105b34e5bb
into bb03385a28
This commit is contained in:
commit
b03d915213
3 changed files with 36 additions and 5 deletions
|
@ -30,6 +30,28 @@ function hideUploadProgress() {
|
|||
$('#uploadingOverlay').css('display', 'none')
|
||||
}
|
||||
|
||||
function showMovingProgress() {
|
||||
$('#movingOverlay').css('display', 'block');
|
||||
}
|
||||
|
||||
function hideMovingProgress() {
|
||||
$('#movingOverlay').css('display', 'none');
|
||||
}
|
||||
|
||||
function moveFileToFolder(event, folderName) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const fullUrl = event.dataTransfer.getData('text/uri-list');
|
||||
const url = new URL(fullUrl);
|
||||
let fileName = url.pathname;
|
||||
|
||||
$('#moveCurrentPath').val(fileName.slice(1));
|
||||
fileName = fileName.split('/').pop();
|
||||
$('#moveNewPath').val(folderName + '/' + fileName);
|
||||
$('#moveFileForm').submit();
|
||||
}
|
||||
|
||||
$('#createDir').on('shown', function () {
|
||||
$('#newDirInput').focus();
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue