aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-05-12 05:34:48 +0200
committerGitHub <noreply@github.com>2020-05-12 04:34:48 +0100
commita4c7ad99e54d0835f759199599a8dcd6f5d7e90e (patch)
treec00c1b369a84ebf31b869bbe7a1a33441a24d035 /web_src/js
parent6a02a4f57aaf5bc1023e6332cfd97658e1e71878 (diff)
downloadgitea-a4c7ad99e54d0835f759199599a8dcd6f5d7e90e.tar.gz
gitea-a4c7ad99e54d0835f759199599a8dcd6f5d7e90e.zip
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.
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index 6ac4a1de5d..a74fba34e8 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -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) {