Fix file selection
This commit is contained in:
@@ -42,24 +42,27 @@ async function postMV(oldLocation,newLocation){
|
||||
|
||||
///Call for onclick of elements
|
||||
function doUpdate(ele,isDir=false){
|
||||
console.log(ele.attr('data-choice'))
|
||||
///Check if succeeds
|
||||
//console.log(ele.attr('data-choice'))
|
||||
if(!isDir){
|
||||
currSel.loc = ele.attr('data-choice')
|
||||
$('.nav-bottom-text').html( (currSel.name = ele.html()) )
|
||||
}else{
|
||||
///Check if navigable directory
|
||||
postLS(ele.attr('data-choice')).then(e=>{
|
||||
if(ele.hasClass('file-isDir')){
|
||||
///Set as current directory
|
||||
currDir.loc=ele.attr('data-choice')
|
||||
updateContents(e)
|
||||
}
|
||||
if(!isDir){
|
||||
currSel.loc = ele.attr('data-choice')
|
||||
$('.nav-bottom-text').html( (currSel.name = ele.html()).substring(7) +"..." )
|
||||
}
|
||||
|
||||
},
|
||||
err=>{
|
||||
console.log(`E:Something went wrong: ${JSON.stringify(err)}`)
|
||||
}).finally()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
///Populate contents
|
||||
function updateContents(contentResponse){
|
||||
|
Reference in New Issue
Block a user