|
@@ -1168,7 +1168,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
if (selectedRowsIdx.length == 0){
|
|
|
return;
|
|
|
}
|
|
|
- $('#loading_message').text("");
|
|
|
+ clearLoading();
|
|
|
KTApp.showPageLoading();
|
|
|
|
|
|
function deleteSelected() {
|
|
@@ -1190,15 +1190,14 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
}
|
|
|
path+='?path={{.CurrentDir}}'+encodeURIComponent("/"+itemName);
|
|
|
|
|
|
- let deleteTxt = "";
|
|
|
if (selectedRowsIdx.length > 1){
|
|
|
- deleteTxt = $.t('fs.deleting', {
|
|
|
+ let info = $.t('fs.deleting', {
|
|
|
idx : index + 1,
|
|
|
- total: selectedRowsIdx.length,
|
|
|
- name: itemName
|
|
|
+ total: selectedRowsIdx.length
|
|
|
});
|
|
|
+ setLoadingText(info,itemName);
|
|
|
}
|
|
|
- $('#loading_message').text(deleteTxt);
|
|
|
+
|
|
|
axios.delete(path,{
|
|
|
timeout: 15000,
|
|
|
headers: {
|
|
@@ -1400,7 +1399,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
let hasError = false;
|
|
|
let index = 0;
|
|
|
|
|
|
- $('#loading_message').text("");
|
|
|
+ clearLoading();
|
|
|
KTApp.showPageLoading();
|
|
|
|
|
|
function copyItem() {
|
|
@@ -1425,12 +1424,11 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
targetPath+=item.targetName;
|
|
|
|
|
|
if (items.length > 1) {
|
|
|
- msgTxt = $.t('fs.copying', {
|
|
|
+ let info = $.t('fs.copying', {
|
|
|
idx: index + 1,
|
|
|
- total: items.length,
|
|
|
- name: `${sourcePath} => ${targetPath}`
|
|
|
+ total: items.length
|
|
|
});
|
|
|
- $('#loading_message').text(msgTxt);
|
|
|
+ setLoadingText(info,`${sourcePath} => ${targetPath}`);
|
|
|
}
|
|
|
let path = '{{.FileActionsURL}}/copy';
|
|
|
path+='?path={{.CurrentDir}}'+encodeURIComponent("/"+item.sourceName)+'&target='+item.targetDir+encodeURIComponent("/"+item.targetName);
|
|
@@ -1550,7 +1548,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
let hasError = false;
|
|
|
let index = 0;
|
|
|
|
|
|
- $('#loading_message').text("");
|
|
|
+ clearLoading();
|
|
|
KTApp.showPageLoading();
|
|
|
|
|
|
function moveItem() {
|
|
@@ -1575,12 +1573,11 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
targetPath+=item.targetName;
|
|
|
|
|
|
if (items.length > 1) {
|
|
|
- msgTxt = $.t('fs.moving', {
|
|
|
+ let info = $.t('fs.moving', {
|
|
|
idx: index + 1,
|
|
|
- total: items.length,
|
|
|
- name: `${sourcePath} => ${targetPath}`
|
|
|
+ total: items.length
|
|
|
});
|
|
|
- $('#loading_message').text(msgTxt);
|
|
|
+ setLoadingText(info,`${sourcePath} => ${targetPath}`);
|
|
|
}
|
|
|
let path = '{{.FileActionsURL}}/move';
|
|
|
path+='?path={{.CurrentDir}}'+encodeURIComponent("/"+item.sourceName)+'&target='+item.targetDir+encodeURIComponent("/"+item.targetName);
|
|
@@ -1690,7 +1687,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
}
|
|
|
}).then((result) => {
|
|
|
if (result.isConfirmed){
|
|
|
- $('#loading_message').text("");
|
|
|
+ clearLoading();
|
|
|
KTApp.showPageLoading();
|
|
|
let isDir = (getTypeFromMeta(meta) == "1");
|
|
|
let path;
|
|
@@ -1822,7 +1819,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- $('#loading_message').text("");
|
|
|
+ clearLoading();
|
|
|
KTApp.showPageLoading();
|
|
|
|
|
|
function executeRename() {
|
|
@@ -1985,7 +1982,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
let success = 0;
|
|
|
let checkedDirs = [];
|
|
|
$('#errorMsg').addClass("d-none");
|
|
|
- $('#loading_message').text("");
|
|
|
+ clearLoading();
|
|
|
KTApp.showPageLoading();
|
|
|
|
|
|
function uploadFile() {
|
|
@@ -2024,16 +2021,15 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
lastModified = "";
|
|
|
}
|
|
|
|
|
|
- let uploadTxt = f.name;
|
|
|
+ let info = "";
|
|
|
if (files.length > 1){
|
|
|
- uploadTxt = $.t('fs.uploading', {
|
|
|
+ info = $.t('fs.uploading', {
|
|
|
idx: index + 1,
|
|
|
- total: files.length,
|
|
|
- name: uploadTxt
|
|
|
+ total: files.length
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- $('#loading_message').text(uploadTxt);
|
|
|
+ setLoadingText(info,f.name);
|
|
|
|
|
|
axios.post(uploadPath, f, {
|
|
|
headers: {
|
|
@@ -2046,7 +2042,7 @@ explicit grant from the SFTPGo Team ([email protected]).
|
|
|
}
|
|
|
const percentage = Math.round((100 * progressEvent.loaded) / progressEvent.total);
|
|
|
if (percentage > 0 && percentage < 100){
|
|
|
- $('#loading_message').text(`${uploadTxt} ${percentage}%`);
|
|
|
+ setLoadingText(info,`${f.name} ${percentage}%`);
|
|
|
}
|
|
|
},
|
|
|
validateStatus: function (status) {
|