summaryrefslogtreecommitdiffstats
path: root/public/ng/js/gogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/ng/js/gogs.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 bade9f3420..c08a887a4c 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
+}