Fix usage of removed jqXHR.success (#11379)

Introduced by b57a735 via removal of jQuery-Migrate.

This PR changes usage of .success on jqXHR to .done.

Fixes #11228 and few other places, such as removal of code comments.
release/v1.15
Cirno the Strongest 2020-05-12 05:34:48 +02:00 committed by GitHub
parent 6a02a4f57a
commit a4c7ad99e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -819,7 +819,7 @@ async function initRepository() {
$.post(update_url, {
_csrf: csrf,
target_branch: targetBranch
}).success((data) => {
}).done((data) => {
$branchTarget.text(data.base_branch);
}).always(() => {
reload();
@ -1044,7 +1044,7 @@ async function initRepository() {
if (window.confirm($this.data('locale'))) {
$.post($this.data('url'), {
_csrf: csrf
}).success(() => {
}).done(() => {
$(`#${$this.data('comment-id')}`).remove();
});
}
@ -2192,7 +2192,7 @@ function initU2FAuth() {
}
u2fApi.ensureSupport()
.then(() => {
$.getJSON(`${AppSubUrl}/user/u2f/challenge`).success((req) => {
$.getJSON(`${AppSubUrl}/user/u2f/challenge`).done((req) => {
u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)
.then(u2fSigned)
.catch((err) => {
@ -2288,7 +2288,7 @@ function u2fRegisterRequest() {
$.post(`${AppSubUrl}/user/settings/security/u2f/request_register`, {
_csrf: csrf,
name: $('#nickname').val()
}).success((req) => {
}).done((req) => {
$('#nickname').closest('div.field').removeClass('error');
$('#register-device').modal('show');
if (req.registeredKeys === null) {