summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-05 13:24:13 -0500
committerUnknwon <u@gogs.io>2015-12-05 13:24:13 -0500
commit404867f206f97ec4ea2e6032fea47bc0499d3497 (patch)
treeb37be9387d2a00cd2447e65a1367bb292c6c0a09 /public/js
parentf0ee33267c453cc7f77a87a2b4b784febbb604dd (diff)
downloadgitea-404867f206f97ec4ea2e6032fea47bc0499d3497.tar.gz
gitea-404867f206f97ec4ea2e6032fea47bc0499d3497.zip
fix #2105 and fix #1857
Diffstat (limited to 'public/js')
-rw-r--r--public/js/gogs.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index a045f56069..be17b8c8f2 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -548,6 +548,19 @@ function initWebhook() {
$('.events.fields').hide();
}
});
+
+ // Test delivery
+ $('#test-delivery').click(function () {
+ var $this = $(this);
+ $this.addClass('loading disabled');
+ $.post($this.data('link'), {
+ "_csrf": csrf
+ }).done(
+ setTimeout(function () {
+ window.location.href = $this.data('redirect');
+ }, 5000)
+ )
+ });
}