aboutsummaryrefslogtreecommitdiff
path: root/public/ng/js/gogs.js
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-01 00:16:14 +0800
committerUnknwon <joe2010xtmf@163.com>2014-09-01 00:16:14 +0800
commitbf5595f9a0ee41a30ab04348e02d87ee9f53969a (patch)
tree93f58ac671e7e9cf1b8b978772075db5dd74928b /public/ng/js/gogs.js
parent36661f53e6cb7bd5fe202157f794255d4d6932af (diff)
parent1ed67798acb532dd2e62d2f3cbdde7b34219bfec (diff)
Merge branch 'dev' of github.com:gogits/gogs into dev
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 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
+}