Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2022-07-06 22:32:28 +0300
committerGitHub <noreply@github.com>2022-07-06 22:32:28 +0300
commit6dd941aba09b507ad14bf2d0ee5b86376c5dbd33 (patch)
tree587b7e4d092033128a0cbaa3252dfdae323e57fa
parent6b90cbed28a8a47814b4809a91a8fee5ec259a8c (diff)
parent14f3029fe5203fefe1e295da675c7618daa4cf1c (diff)
Merge pull request #33125 from nextcloud/backport/32993/stable24
[stable24] 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 69322273a11..3530cb66301 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 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: ?>