From 2bce24068dc3c64ee5e501c48b7f080c48383970 Mon Sep 17 00:00:00 2001 From: Christopher Brickley Date: Sun, 24 Aug 2014 08:59:47 -0400 Subject: add Slack API webhook support --- public/ng/js/gogs.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'public/ng/js') diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index bade9f34..c08a887a 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -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'); }); -} \ No newline at end of file +} -- cgit v1.2.3