Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid unnecessary animation, particularly on page load (CO-2330) (#43)
arlen committed Oct 27, 2022
1 parent 520c9be commit 4f071af
Showing 4 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions app/templates/MatchgridSettings/fields.inc
@@ -36,11 +36,11 @@ use \App\Lib\Enum\ReferenceIdEnum;
var method = document.getElementById('referenceid-method').value;

if(method == '<?= ReferenceIdEnum::Sequence ?>') {
$("#referenceid-prefix").closest('li').show('fade');
$("#referenceid-start").closest('li').show('fade');
$("#referenceid-prefix").closest('li').show();
$("#referenceid-start").closest('li').show();
} else {
$("#referenceid-prefix").closest('li').hide('fade');
$("#referenceid-start").closest('li').hide('fade');
$("#referenceid-prefix").closest('li').hide();
$("#referenceid-start").closest('li').hide();
}
}

2 changes: 1 addition & 1 deletion app/templates/Permissions/fields.inc
@@ -40,7 +40,7 @@ use \App\Lib\Enum\PermissionEnum;
// Blank out Matchgrid ID
document.getElementById('matchgrid-id').selectedIndex = 0;
} else {
$("#matchgrid-id").closest('li').show('fade');
$("#matchgrid-id").closest('li').show();
}
}

7 changes: 2 additions & 5 deletions app/templates/RuleAttributes/fields.inc
@@ -39,12 +39,9 @@ use \App\Lib\Enum\SearchTypeEnum;
if(req) {
// If the RuleAttribute is Required, we can't Match Empty Values since the
// attribute isn't permitted to be empty

document.getElementById('match-empty').closest('li').hidden = true;
// XXX we want .show('fade') but jquery apparently not set up?
// or maybe not... instant update actually looks better
$("#match-empty").closest('li').hide();
} else {
document.getElementById('match-empty').closest('li').hidden = false;
$("#match-empty").closest('li').show();
}
}

4 changes: 2 additions & 2 deletions app/templates/SystemsOfRecord/fields.inc
@@ -36,9 +36,9 @@ use \App\Lib\Enum\ResolutionModeEnum;
var method = document.getElementById('resolution-mode').value;

if(method == '<?= ResolutionModeEnum::External ?>') {
$("#notification-email").closest('li').show('fade');
$("#notification-email").closest('li').show();
} else {
$("#notification-email").closest('li').hide('fade');
$("#notification-email").closest('li').hide();
}
}

0 comments on commit 4f071af

Please sign in to comment.