add Slack API webhook support

This commit is contained in:
Christopher Brickley 2014-08-24 08:59:47 -04:00
parent 5e6091a30a
commit 2bce24068d
15 changed files with 485 additions and 79 deletions

View file

@ -359,6 +359,22 @@ function initRepoSetting() {
return true;
}
});
// web hook type change
$('select#hook-type').on("change", function () {
hookTypes = ['Gogs','Slack'];
var curHook = $(this).val();
hookTypes.forEach(function(hookType) {
if (curHook === hookType) {
$('div#'+hookType.toLowerCase()).toggleShow();
}
else {
$('div#'+hookType.toLowerCase()).toggleHide();
}
});
});
$('#transfer-button').click(function () {
$('#transfer-form').show();
});
@ -594,4 +610,4 @@ function homepage() {
}
$('#promo-form').attr('action', '/user/sign_up');
});
}
}