Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use on/trigger event #24098

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web_src/js/features/admin/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ export function initAdminUserListSearchForm() {
}
}

$form.find(`input[type=radio]`).click(() => {
$form.submit();
$form.find(`input[type=radio]`).on('click', () => {
$form.trigger('submit');
return false;
});

$form.find('.j-reset-status-filter').click(() => {
$form.find('.j-reset-status-filter').on('click', () => {
$form.find(`input[type=radio]`).each((_, e) => {
const $e = $(e);
if ($e.attr('name').startsWith('status_filter[')) {
$e.prop('checked', false);
}
});
$form.submit();
$form.trigger('submit');
return false;
});
}
2 changes: 1 addition & 1 deletion web_src/js/features/repo-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function initRepoCommentForm() {
const $selectBranch = $('.ui.select-branch');
const $branchMenu = $selectBranch.find('.reference-list-menu');
const $isNewIssue = $branchMenu.hasClass('new-issue');
$branchMenu.find('.item:not(.no-select)').click(function () {
$branchMenu.find('.item:not(.no-select)').on('click', function () {
const selectedValue = $(this).data('id');
const editMode = $('#editing_mode').val();
$($(this).data('id-selector')).val(selectedValue);
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/features/repo-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function initRepoProject() {
});

$('.delete-project-board').each(function () {
$(this).click(function (e) {
$(this).on('click', function (e) {
e.preventDefault();

$.ajax({
Expand All @@ -158,7 +158,7 @@ export function initRepoProject() {
});
});

$('#new_board_submit').click(function (e) {
$('#new_board_submit').on('click', function (e) {
e.preventDefault();

const boardTitle = $('#new_board');
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/user-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function initUserAuthOauth2() {
const $oauth2LoginNav = $('#oauth2-login-navigator');
if ($oauth2LoginNav.length === 0) return;

$oauth2LoginNav.find('.oauth-login-image').click(() => {
$oauth2LoginNav.find('.oauth-login-image').on('click', () => {
const oauthLoader = $('#oauth2-login-loader');
const oauthNav = $('#oauth2-login-navigator');

Expand Down