summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-28 23:36:13 +0800
committerUnknwon <u@gogs.io>2015-08-28 23:36:13 +0800
commitf509c59ac13dffdff6a246572de04150ee295314 (patch)
tree3be3923779cedce3058f28f1d32604226985be03 /public/js
parenta541ca16b67d492340ac55b84ff190d2a52fc39d (diff)
downloadgitea-f509c59ac13dffdff6a246572de04150ee295314.tar.gz
gitea-f509c59ac13dffdff6a246572de04150ee295314.zip
new create webhook event
Diffstat (limited to 'public/js')
-rw-r--r--public/js/gogs.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index 34bd840606..6827aada84 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -367,6 +367,23 @@ function initRepository() {
}
};
+function initWebhook() {
+ if ($('.new.webhook').length == 0) {
+ return;
+ }
+
+ $('.events.checkbox input').change(function () {
+ if ($(this).is(':checked')) {
+ $('.events.fields').show();
+ }
+ });
+ $('.non-events.checkbox input').change(function () {
+ if ($(this).is(':checked')) {
+ $('.events.fields').hide();
+ }
+ });
+}
+
$(document).ready(function () {
csrf = $('meta[name=_csrf]').attr("content");
@@ -473,4 +490,5 @@ $(document).ready(function () {
initCommentForm();
initInstall();
initRepository();
+ initWebhook();
}); \ No newline at end of file