Trim content not required

This commit is contained in:
2019-05-26 21:50:08 +05:30
parent d50f0bc4a0
commit bed5762657
2 changed files with 9 additions and 29 deletions

View File

@@ -1,6 +1,5 @@
{ {
"dirname":"./sandbox/", "dirname":"./sandbox/",
"dbpath":null,
"showHidden":false, "showHidden":false,
"port":8080 "port":8080
} }

View File

@@ -54,40 +54,20 @@ function populateContents(){
} }
// Closing the rename window
function closeRenameWindow(){
//
}
// Closing the upload window
function closeUploadWindow(){
//
}
$(document).ready(()=>{ $(document).ready(()=>{
populateContents(); populateContents();
$('.file-download-button').click(()=>{ $('.file-download-button').click(()=>{
console.log(currSel) console.log(currSel)
/*$.ajax('/files/cat',{
method:'post',
data:currSel,
xhrFields: {
responseType: 'blob'
},
xhr:()=>{
var xhr = new XMLHttpRequest();
xhr.addEventListener('progress',(ev)=>{
//console.log([ev.loaded,ev.total,ev.lengthComputable])
if(ev.lengthComputable){
$('.file-download-percent').html(`${Math.round(100*ev.loaded/ev.total)}%`)
}
})
xhr.upload.addEventListener('error',(ev)=>{
$('.file-download-percent').html('F')
})
return xhr
},
success:(msg)=>{
//console.log(msg)
$('.file-download-button').after(`<a id="down-temp" href="${window.URL.createObjectURL(msg)}" download="${currSel.name}"></a>`)
document.getElementById('down-temp').click()
$('#down-temp').remove();
},
error: err=>console.log(err)
})*/
if(currSel.loc===null){ if(currSel.loc===null){
alert("Please select a file"); alert("Please select a file");
} }
@@ -113,4 +93,5 @@ $(document).ready(()=>{
$('#cover').fadeIn('fast') $('#cover').fadeIn('fast')
$('.upload-window').fadeIn('fast') $('.upload-window').fadeIn('fast')
}) })
}) })