forked from forgejo/forgejo
Remove jQuery calls that have no effect on showElem
and hideElem
(#30110)
There's no need to initialize a jQuery object with a CSS selector when we can pass the CSS selector directly. Signed-off-by: Yarden Shoham <git@yardenshoham.com> (cherry picked from commit a1f11e2e33f20409eac65b2d0e9a7cd7c767eb72)
This commit is contained in:
parent
7e0dfa07ba
commit
95024f1486
3 changed files with 22 additions and 22 deletions
|
@ -64,10 +64,10 @@ export function initRepoEditor() {
|
|||
|
||||
$('.js-quick-pull-choice-option').on('change', function () {
|
||||
if ($(this).val() === 'commit-to-new-branch') {
|
||||
showElem($('.quick-pull-branch-name'));
|
||||
showElem('.quick-pull-branch-name');
|
||||
document.querySelector('.quick-pull-branch-name input').required = true;
|
||||
} else {
|
||||
hideElem($('.quick-pull-branch-name'));
|
||||
hideElem('.quick-pull-branch-name');
|
||||
document.querySelector('.quick-pull-branch-name input').required = false;
|
||||
}
|
||||
$('#commit-button').text(this.getAttribute('button_text'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue