aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguan <33579835+g-u-a-n@users.noreply.github.com>2020-02-28 22:52:26 +0800
committerGitHub <noreply@github.com>2020-02-28 22:52:26 +0800
commit40214ef109fda6d0ca1e7cc188cbaa3976c1e194 (patch)
tree47be0022ccd8abea4fec2d80edcd21d2b3e3c2cf
parent4f70ab8e2711e8e73b66a1da62544ed29c115c0b (diff)
public: fix jquery3.x syntax error (#5951)
$.post().success -> $.post().done
-rw-r--r--public/js/gogs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index b7b30cb4..2d2aa091 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -425,7 +425,7 @@ function initRepository() {
if (confirm($this.data('locale'))) {
$.post($this.data('url'), {
"_csrf": csrf
- }).success(function () {
+ }).done(function () {
$('#' + $this.data('comment-id')).remove();
});
}
@@ -1310,7 +1310,7 @@ $(document).ready(function () {
$.post($this.data('url'), {
"_csrf": csrf,
"id": $this.data("id")
- }).success(function (data) {
+ }).done(function (data) {
window.location.href = data.redirect;
});
}