From 591dda2fedcaa73f605bb336e2aece19229ec43c Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 23 Aug 2017 15:43:52 +0200 Subject: [PATCH 1/2] Show "Uploading..." in web UI for long uploads If the estimated upload time is bigger than 4 hours it shows the text "Uploading..." because the time then doesn't give any good hint to the user anyways. Signed-off-by: Morris Jobke --- apps/files/js/file-upload.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 2fa3122a008..11365a310ed 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -1021,6 +1021,10 @@ OC.Uploader.prototype = _.extend({ } var h = moment.duration(smoothRemainingSeconds, "seconds").humanize(); + if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) { + // show "Uploading ..." for durations longer than 4 hours + h = t('files', 'Uploading...'); + } $('#uploadprogressbar .label .mobile').text(h); $('#uploadprogressbar .label .desktop').text(h); $('#uploadprogressbar').attr('original-title', From 57fd256b9af431ebdf6a333e9e3b04ef12e62727 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 23 Aug 2017 16:22:11 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Replace=20...=20with=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Morris Jobke --- apps/files/js/file-upload.js | 6 +++--- apps/files/templates/list.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 11365a310ed..1f99d561a13 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -971,9 +971,9 @@ OC.Uploader.prototype = _.extend({ $('#uploadprogressbar').progressbar({value: 0}); $('#uploadprogressbar .ui-progressbar-value'). html('' - + t('files', 'Uploading...') + + t('files', 'Uploading …') + '' - + t('files', '...') + + t('files', '…') + ''); $('#uploadprogressbar').tooltip({placement: 'bottom'}); self._showProgressBar(); @@ -1023,7 +1023,7 @@ OC.Uploader.prototype = _.extend({ var h = moment.duration(smoothRemainingSeconds, "seconds").humanize(); if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) { // show "Uploading ..." for durations longer than 4 hours - h = t('files', 'Uploading...'); + h = t('files', 'Uploading …'); } $('#uploadprogressbar .label .mobile').text(h); $('#uploadprogressbar .label .desktop').text(h); diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index d66f12f4aff..b8b72a10100 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -2,7 +2,7 @@