aboutsummaryrefslogtreecommitdiff
path: root/public/ng/js
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-09-01 00:12:58 +0800
committer无闻 <joe2010xtmf@163.com>2014-09-01 00:12:58 +0800
commit1ed67798acb532dd2e62d2f3cbdde7b34219bfec (patch)
tree1ec707518cb37307cd05fa5cf6ef6bbf670caf9b /public/ng/js
parent5e6091a30ae4befd68041aaff3f70d7334ce1b1c (diff)
parent2bce24068dc3c64ee5e501c48b7f080c48383970 (diff)
Merge pull request #379 from compressed/slack
Slack 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
+}