diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-07-05 22:21:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 22:21:30 +0200 |
commit | 79b6caada8c059d1e0dc0e9c9b5ca7a3f535b8b0 (patch) | |
tree | 6a51687d8d40bda1d2e77648a049ee7b960932c8 /apps/files | |
parent | 8b23c1c6772afdd4a1709bdb85cf3b88c5b5a6a5 (diff) | |
parent | 55722092d3602ba456e9b3bf2c6b06a871aa4bb3 (diff) | |
download | nextcloud-server-79b6caada8c059d1e0dc0e9c9b5ca7a3f535b8b0.tar.gz nextcloud-server-79b6caada8c059d1e0dc0e9c9b5ca7a3f535b8b0.zip |
Merge pull request #32993 from nextcloud/fixes-for-quota-text-in-navigation-bar
Fixes for quota text in navigation bar
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 10 | ||||
-rw-r--r-- | apps/files/js/files.js | 4 | ||||
-rw-r--r-- | apps/files/templates/appnavigation.php | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 19b746ec847..42afe792142 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2637,7 +2637,10 @@ self.showFileBusyState($tr, false); }); }; - return this.reportOperationProgress(fileNames, moveFileFunction, callback); + return this.reportOperationProgress(fileNames, moveFileFunction, callback).then(function() { + self.updateStorageStatistics(); + self.updateStorageQuotas(); + }); }, _reflect: function (promise){ @@ -2817,7 +2820,10 @@ } }); }; - return this.reportOperationProgress(fileNames, copyFileFunction, callback); + return this.reportOperationProgress(fileNames, copyFileFunction, callback).then(function() { + self.updateStorageStatistics(); + self.updateStorageQuotas(); + }); }, /** diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 8645719f82b..5f00ce2cb22 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -105,9 +105,9 @@ if (response.data.quota > 0) { $('#quota').attr('data-original-title', Math.floor(response.data.used/response.data.quota*1000)/10 + '%'); $('#quota progress').val(response.data.usedSpacePercent); - $('#quotatext').text(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanQuota})); + $('#quotatext').html(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanQuota})); } else { - $('#quotatext').text(t('files', '{used} used', {used: humanUsed})); + $('#quotatext').html(t('files', '{used} used', {used: humanUsed})); } if (response.data.usedSpacePercent > 80) { $('#quota progress').addClass('warn'); diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php index 0bfdc6f0b54..9aea68fef99 100644 --- a/apps/files/templates/appnavigation.php +++ b/apps/files/templates/appnavigation.php @@ -12,7 +12,7 @@ <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> <li id="quota" class="pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>"> <a href="#" class="icon-quota svg"> - <p><?php p($l->t('%s used', [$_['usage']])); ?></p> + <p id="quotatext"><?php p($l->t('%s used', [$_['usage']])); ?></p> </a> </li> <?php else: ?> |