summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-07-06 21:53:29 +0200
committerGitHub <noreply@github.com>2022-07-06 21:53:29 +0200
commitce983ec177f5d1a313de068b7cbcaf35cfb17af7 (patch)
treead83eda468c61154f8d2812e99b0659fae3c53ab
parent6a49fc2fabc1dbed9ab40718b961baad8b34c536 (diff)
parent4cfdfc3cb4629434672d8191589fb4ec93587fd9 (diff)
downloadnextcloud-server-ce983ec177f5d1a313de068b7cbcaf35cfb17af7.tar.gz
nextcloud-server-ce983ec177f5d1a313de068b7cbcaf35cfb17af7.zip
Merge pull request #33133 from nextcloud/backport/32993/stable23
[stable23] Fixes for quota text in navigation bar
-rw-r--r--apps/files/js/filelist.js10
-rw-r--r--apps/files/js/files.js4
-rw-r--r--apps/files/templates/appnavigation.php2
3 files changed, 11 insertions, 5 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 4b743388a7f..e7fada6b20a 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -2630,7 +2630,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){
@@ -2810,7 +2813,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 7d17be21817..0fb0165e89f 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: ?>