aboutsummaryrefslogtreecommitdiff
path: root/public/ng/js
diff options
context:
space:
mode:
authorChristopher Brickley <brickley@gmail.com>2014-08-24 08:59:47 -0400
committerChristopher Brickley <brickley@gmail.com>2014-08-31 12:01:59 -0400
commit2bce24068dc3c64ee5e501c48b7f080c48383970 (patch)
tree1ec707518cb37307cd05fa5cf6ef6bbf670caf9b /public/ng/js
parent5e6091a30ae4befd68041aaff3f70d7334ce1b1c (diff)
add Slack API webhook support
Diffstat (limited to 'public/ng/js')
-rw-r--r--public/ng/js/gogs.js18
1 files changed, 17 insertions, 1 deletions
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
+}