remove old move
Former-commit-id: e31baa21e3ba8391bbc7cd71c174d085a61849bd [formerly 77a7df24b3f97f665fe9cdfcf969028306d04701] [formerly bd6bc86f06dd239b94546eef1c311077b9a575de [formerly 87ed75adc8
]]
Former-commit-id: f92c71163c9e64c4077a8cae50015e1a45ba84e1 [formerly 18f7d0ec49e502db47b1bda8c6561fcce95749ae]
Former-commit-id: ec018ca76f2f9481972aac0e5eaabb90d1b05d27
This commit is contained in:
parent
090116caf5
commit
140ce5c1fb
|
@ -80,37 +80,6 @@ listing.addDoubleTapEvent = function () {
|
|||
})
|
||||
}
|
||||
|
||||
listing.moveSelected = function (event) {
|
||||
event.preventDefault()
|
||||
|
||||
let promises = []
|
||||
buttons.setLoading('move')
|
||||
|
||||
for (let file of selectedItems) {
|
||||
let fileElement = document.getElementById(file),
|
||||
destFolder = event.target.querySelector('p code').innerHTML
|
||||
|
||||
if (event.currentTarget.querySelector('li[aria-selected=true]') != null) {
|
||||
destFolder = event.currentTarget.querySelector('li[aria-selected=true]').dataset.url
|
||||
}
|
||||
|
||||
let destPath = '/' + destFolder + '/' + fileElement.querySelector('.name').innerHTML
|
||||
destPath = destPath.replace('//', '/')
|
||||
|
||||
promises.push(webdav.move(fileElement.dataset.url, destPath))
|
||||
}
|
||||
|
||||
Promise.all(promises)
|
||||
.then(() => {
|
||||
closePrompt(event)
|
||||
buttons.setDone('move')
|
||||
listing.reload()
|
||||
})
|
||||
.catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', event => {
|
||||
listing.updateColumns()
|
||||
|
|
Loading…
Reference in New Issue