add organization-level webhooks

This commit is contained in:
Christopher Brickley 2014-09-04 07:17:00 -04:00
parent 7269b06fd5
commit 85c35a6b8b
12 changed files with 208 additions and 24 deletions

View file

@ -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() {