aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/js/settings.js
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2024-07-29 12:13:21 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-09-04 09:46:17 +0200
commitd0ba10d6ae3d0187ac70dae6e2c24b7e9bca519e (patch)
tree165e813c6a24f6f3b9ab8ac541c0781a5c5f1fac /apps/files_external/js/settings.js
parent05bf5730ad7df2ee285709cb47998cb9bfed376e (diff)
downloadnextcloud-server-d0ba10d6ae3d0187ac70dae6e2c24b7e9bca519e.tar.gz
nextcloud-server-d0ba10d6ae3d0187ac70dae6e2c24b7e9bca519e.zip
fix: Remove status check when configuration was changed
Setting a null status was supposed to remove the status check, but nothing was changed in that case. Now the status check is properly removed, and doing that by hiding the element rather than just turning it invisible also prevents that clicking on the invisible status triggers a check, as until the new configuration is saved the check will still be performed with the old configuration, which could be misleading for the user. Additionally, an explicit width is set to the parent of the span element to prevent its width from changing when the span is shown and hidden. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files_external/js/settings.js')
-rw-r--r--apps/files_external/js/settings.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index fd1946b629c..b4e1cc04498 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -1316,6 +1316,7 @@ MountConfigListView.prototype = _.extend({
switch (status) {
case null:
// remove status
+ $statusSpan.hide();
break;
case StorageConfig.Status.IN_PROGRESS:
$statusSpan.attr('class', 'icon-loading-small');
@@ -1329,6 +1330,9 @@ MountConfigListView.prototype = _.extend({
default:
$statusSpan.attr('class', 'error icon-error-white');
}
+ if (status !== null) {
+ $statusSpan.show();
+ }
if (typeof message === 'string') {
$statusSpan.attr('title', message);
}