diff options
author | Christopher Brickley <brickley@gmail.com> | 2014-09-04 07:17:00 -0400 |
---|---|---|
committer | Christopher Brickley <brickley@gmail.com> | 2014-09-05 07:19:34 -0400 |
commit | 85c35a6b8bb7430568d375d1e792e1417bbd7f4b (patch) | |
tree | d269e4a890036a76d8f8cd60f8d65e7a0c80d865 /public | |
parent | 7269b06fd5992776c07ae0303f85e0d05b1e62e9 (diff) | |
download | gitea-85c35a6b8bb7430568d375d1e792e1417bbd7f4b.tar.gz gitea-85c35a6b8bb7430568d375d1e792e1417bbd7f4b.zip |
add organization-level webhooks
Diffstat (limited to 'public')
-rw-r--r-- | public/ng/js/gogs.js | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index c08a887a4c..c60a5cf648 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -349,17 +349,8 @@ function initRepo() { }) } -function initRepoSetting() { - // Options. - // Confirmation of changing repository name. - $('#repo-setting-form').submit(function (e) { - var $reponame = $('#repo_name'); - if (($reponame.data('repo-name') != $reponame.val()) && !confirm('Repository name has been changed, do you want to continue?')) { - e.preventDefault(); - return true; - } - }); - +// when user changes hook type, hide/show proper divs +function initHookTypeChange() { // web hook type change $('select#hook-type').on("change", function () { hookTypes = ['Gogs','Slack']; @@ -374,6 +365,20 @@ function initRepoSetting() { } }); }); +} + +function initRepoSetting() { + // Options. + // Confirmation of changing repository name. + $('#repo-setting-form').submit(function (e) { + var $reponame = $('#repo_name'); + if (($reponame.data('repo-name') != $reponame.val()) && !confirm('Repository name has been changed, do you want to continue?')) { + e.preventDefault(); + return true; + } + }); + + initHookTypeChange(); $('#transfer-button').click(function () { $('#transfer-form').show(); @@ -421,6 +426,8 @@ function initOrgSetting() { return true; } }); + + initHookTypeChange(); } function initInvite() { |