mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
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>
This commit is contained in:
parent
9e06254239
commit
a0068126ee
2 changed files with 6 additions and 0 deletions
|
|
@ -28,6 +28,8 @@
|
|||
/* overwrite conflicting core styles */
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
/* ensure width does not change even if internal span is not displayed */
|
||||
width: 43px;
|
||||
}
|
||||
|
||||
#externalStorage td.status > span {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue