diff options
author | Unknwon <u@gogs.io> | 2015-08-28 23:36:13 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-28 23:36:13 +0800 |
commit | f509c59ac13dffdff6a246572de04150ee295314 (patch) | |
tree | 3be3923779cedce3058f28f1d32604226985be03 /public/js | |
parent | a541ca16b67d492340ac55b84ff190d2a52fc39d (diff) | |
download | gitea-f509c59ac13dffdff6a246572de04150ee295314.tar.gz gitea-f509c59ac13dffdff6a246572de04150ee295314.zip |
new create webhook event
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/gogs.js | 18 |
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 |