diff --git a/static/locales/en/translation.json b/static/locales/en/translation.json
index e61dd372..6db16b35 100644
--- a/static/locales/en/translation.json
+++ b/static/locales/en/translation.json
@@ -291,10 +291,10 @@
"no_files_folders": "No files or folders",
"invalid_name": "File or folder names cannot contain \"/\"",
"folder_name_required": "Folder name is required",
- "deleting": "Delete {{idx}}/{{total}}: {{- name}}",
- "copying": "Copy {{idx}}/{{total}}: {{- name}}",
- "moving": "Move {{idx}}/{{total}}: {{- name}}",
- "uploading": "Upload {{idx}}/{{total}}: {{- name}}",
+ "deleting": "Delete {{idx}}/{{total}}",
+ "copying": "Copy {{idx}}/{{total}}",
+ "moving": "Move {{idx}}/{{total}}",
+ "uploading": "Upload {{idx}}/{{total}}",
"err_403": "Permission denied",
"err_429": "Too many concurrent requests",
"err_generic": "Unable to access the requested resource",
diff --git a/static/locales/it/translation.json b/static/locales/it/translation.json
index 08e711aa..de5df0d6 100644
--- a/static/locales/it/translation.json
+++ b/static/locales/it/translation.json
@@ -291,10 +291,10 @@
"no_files_folders": "Nessun file o cartella",
"invalid_name": "I nomi di file o cartelle non possono contenere \"/\"",
"folder_name_required": "Il nome della cartella รจ obbligatorio",
- "deleting": "Eliminazione {{idx}}/{{total}}: {{- name}}",
- "copying": "Copia {{idx}}/{{total}}: {{- name}}",
- "moving": "Spostamento {{idx}}/{{total}}: {{- name}}",
- "uploading": "Caricamento {{idx}}/{{total}}: {{- name}}",
+ "deleting": "Eliminazione {{idx}}/{{total}}",
+ "copying": "Copia {{idx}}/{{total}}",
+ "moving": "Spostamento {{idx}}/{{total}}",
+ "uploading": "Caricamento {{idx}}/{{total}}",
"err_403": "Non si dispone delle autorizzazioni richieste",
"err_429": "Troppe richieste contemporanee",
"err_generic": "Impossibile accedere alla risorsa richiesta",
diff --git a/templates/common/base.html b/templates/common/base.html
index b6f2459f..580b7f8a 100644
--- a/templates/common/base.html
+++ b/templates/common/base.html
@@ -311,6 +311,16 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}
+ function clearLoading() {
+ $('#loading_info').text("");
+ $('#loading_message').text("");
+ }
+
+ function setLoadingText(info, message) {
+ $('#loading_info').text(info);
+ $('#loading_message').text(message);
+ }
+
KTUtil.onDOMContentLoaded(function () {
var dismissErrorBtn = $('#id_dismiss_error_msg');
if (dismissErrorBtn.length){
@@ -911,7 +921,8 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
+
+
diff --git a/templates/webadmin/admins.html b/templates/webadmin/admins.html
index ff502383..ea28f2c7 100644
--- a/templates/webadmin/admins.html
+++ b/templates/webadmin/admins.html
@@ -125,7 +125,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.AdminURL}}' + "/" + encodeURIComponent(username);
@@ -187,7 +187,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.AdminURL}}' + "/" + encodeURIComponent(username)+"/2fa/disable";
diff --git a/templates/webadmin/configs.html b/templates/webadmin/configs.html
index 1fa44158..2ad3b9fa 100644
--- a/templates/webadmin/configs.html
+++ b/templates/webadmin/configs.html
@@ -647,7 +647,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
return;
}
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let data = {"base_redirect_url": getCurrentURI(), "provider": parseInt($('#idSMTPOAuth2Provider').val()),
@@ -744,7 +744,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let debug = 0;
if ($('#idSMTPDebug').is(':checked')){
diff --git a/templates/webadmin/connections.html b/templates/webadmin/connections.html
index 0e4c1b0b..f75da80a 100644
--- a/templates/webadmin/connections.html
+++ b/templates/webadmin/connections.html
@@ -82,7 +82,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.ConnectionsURL}}' + "/" + encodeURIComponent(connectionID);
if (node) {
diff --git a/templates/webadmin/defender.html b/templates/webadmin/defender.html
index 9f0fd569..85521f45 100644
--- a/templates/webadmin/defender.html
+++ b/templates/webadmin/defender.html
@@ -78,7 +78,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.DefenderHostsURL}}' + "/" + encodeURIComponent(id);
diff --git a/templates/webadmin/eventactions.html b/templates/webadmin/eventactions.html
index 960af127..2d7f7311 100644
--- a/templates/webadmin/eventactions.html
+++ b/templates/webadmin/eventactions.html
@@ -78,7 +78,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.EventActionURL}}' + "/" + encodeURIComponent(name);
diff --git a/templates/webadmin/eventrules.html b/templates/webadmin/eventrules.html
index 2eebf1bc..a11756f4 100644
--- a/templates/webadmin/eventrules.html
+++ b/templates/webadmin/eventrules.html
@@ -80,7 +80,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.EventRuleURL}}' + "/" + encodeURIComponent(name);
@@ -135,7 +135,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.EventRuleURL}}' + "/run/" + encodeURIComponent(name);
diff --git a/templates/webadmin/folders.html b/templates/webadmin/folders.html
index 052b266f..5f076c00 100644
--- a/templates/webadmin/folders.html
+++ b/templates/webadmin/folders.html
@@ -110,7 +110,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.FolderURL}}' + "/" + encodeURIComponent(name);
diff --git a/templates/webadmin/groups.html b/templates/webadmin/groups.html
index 5af6a316..106ed116 100644
--- a/templates/webadmin/groups.html
+++ b/templates/webadmin/groups.html
@@ -96,7 +96,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.GroupURL}}' + "/" + encodeURIComponent(name);
diff --git a/templates/webadmin/iplists.html b/templates/webadmin/iplists.html
index d8d1dd6d..c7aa85e5 100644
--- a/templates/webadmin/iplists.html
+++ b/templates/webadmin/iplists.html
@@ -210,7 +210,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.IPListURL}}' + "/" + encodeURIComponent(listType)+ "/" + encodeURIComponent(ipNet);
axios.delete(path, {
diff --git a/templates/webadmin/roles.html b/templates/webadmin/roles.html
index 6a59d951..9183ea09 100644
--- a/templates/webadmin/roles.html
+++ b/templates/webadmin/roles.html
@@ -97,7 +97,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.RoleURL}}' + "/" + encodeURIComponent(name);
diff --git a/templates/webadmin/users.html b/templates/webadmin/users.html
index f0d7884f..d8fc866d 100644
--- a/templates/webadmin/users.html
+++ b/templates/webadmin/users.html
@@ -145,7 +145,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.UserURL}}' + "/" + encodeURIComponent(username);
@@ -200,7 +200,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.UserURL}}' + "/" + encodeURIComponent(username)+"/2fa/disable";
@@ -230,7 +230,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
function quotaScanAction(username) {
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.QuotaScanURL}}' + "/" + encodeURIComponent(username);
axios.post(path, null, {
diff --git a/templates/webclient/files.html b/templates/webclient/files.html
index bec318d7..a84deebf 100644
--- a/templates/webclient/files.html
+++ b/templates/webclient/files.html
@@ -1168,7 +1168,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
if (selectedRowsIdx.length == 0){
return;
}
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
function deleteSelected() {
@@ -1190,15 +1190,14 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
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 (support@sftpgo.com).
let hasError = false;
let index = 0;
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
function copyItem() {
@@ -1425,12 +1424,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
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 (support@sftpgo.com).
let hasError = false;
let index = 0;
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
function moveItem() {
@@ -1575,12 +1573,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
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 (support@sftpgo.com).
}
}).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 (support@sftpgo.com).
return;
}
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
function executeRename() {
@@ -1985,7 +1982,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
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 (support@sftpgo.com).
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 (support@sftpgo.com).
}
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) {
diff --git a/templates/webclient/shares.html b/templates/webclient/shares.html
index a50db99c..8733ebf4 100644
--- a/templates/webclient/shares.html
+++ b/templates/webclient/shares.html
@@ -176,7 +176,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
}).then((result) => {
if (result.isConfirmed){
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
let path = '{{.ShareURL}}' + "/" + encodeURIComponent(shareID);
diff --git a/templates/webclient/shareupload.html b/templates/webclient/shareupload.html
index 6d29764c..92b0cccd 100644
--- a/templates/webclient/shareupload.html
+++ b/templates/webclient/shareupload.html
@@ -67,7 +67,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
let success = 0;
let checkedDirs = [];
$('#errorMsg').addClass("d-none");
- $('#loading_message').text("");
+ clearLoading();
KTApp.showPageLoading();
function uploadFile() {
@@ -110,16 +110,15 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
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: {
@@ -132,7 +131,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
}
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) {