From 79320200ccdeb12c26b8402392f6a09ed53f983f Mon Sep 17 00:00:00 2001 From: Christopher Mueller Date: Tue, 31 Mar 2020 17:47:22 +0000 Subject: [PATCH] add translation strings & add margin to uploaded files-list Signed-off-by: Christopher Mueller --- apps/files_sharing/css/public.scss | 2 +- apps/files_sharing/js/files_drop.js | 7 +++---- apps/files_sharing/templates/public.php | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss index aad2e97dec..f6d889370f 100644 --- a/apps/files_sharing/css/public.scss +++ b/apps/files_sharing/css/public.scss @@ -139,7 +139,7 @@ thead { #public-upload #emptycontent ul { width: 230px; - margin: 5px auto; + margin: 5px auto 5vh; text-align: left; } diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index ba280b2544..8bf80554b5 100644 --- a/apps/files_sharing/js/files_drop.js +++ b/apps/files_sharing/js/files_drop.js @@ -66,7 +66,6 @@ $('#drop-uploaded-files').append(output({isUploading: true, name: data.files[0].name})); $('[data-toggle="tooltip"]').tooltip(); - $('#drop-upload-status').text('waiting...'); data.submit(); return true; @@ -90,14 +89,13 @@ sequentialUploads: true, start: function(e) { self._uploading = true; - $('#drop-upload-status').text('starting'); }, stop: function(e) { self._uploading = false; }, add: function(e, data) { Drop.addFileToUpload(e, data); - $('#drop-upload-status').text('waiting...'); + $('#drop-upload-status').text(t('files_sharing', 'waiting...')); //we return true to keep trying to upload next file even //if addFileToUpload did not like the privious one return true; @@ -114,6 +112,7 @@ 'Could not upload "{filename}"', {filename: data.files[0].name} )); + $('#drop-upload-status').text(t('files_sharing', 'error')); var errorIconSrc = OC.imagePath('core', 'actions/error.svg'); var fileItem = output({isUploading: false, iconSrc: errorIconSrc, name: data.files[0].name}); Drop.updateFileItem(data.files[0].name, fileItem); @@ -132,7 +131,7 @@ var progress = parseInt(data.loaded / data.total * 100, 10); if(progress === 100) { $('#drop-upload-progress-bar').val(100); - $('#drop-upload-status').text('finished'); + $('#drop-upload-status').text(t('files_sharing', 'finished')); } else { $('#drop-upload-progress-bar').val(progress); $('#drop-upload-status').text(progress + '%'); diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index e029279535..edde05d9f6 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -99,7 +99,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size); t('Select or drop files')) ?> - +