diff options
author | Christopher Brickley <brickley@gmail.com> | 2014-08-24 08:59:47 -0400 |
---|---|---|
committer | Christopher Brickley <brickley@gmail.com> | 2014-08-31 12:01:59 -0400 |
commit | 2bce24068dc3c64ee5e501c48b7f080c48383970 (patch) | |
tree | 1ec707518cb37307cd05fa5cf6ef6bbf670caf9b /public | |
parent | 5e6091a30ae4befd68041aaff3f70d7334ce1b1c (diff) | |
download | gitea-2bce24068dc3c64ee5e501c48b7f080c48383970.tar.gz gitea-2bce24068dc3c64ee5e501c48b7f080c48383970.zip |
add Slack API webhook support
Diffstat (limited to 'public')
-rw-r--r-- | public/ng/css/gogs.css | 26 | ||||
-rw-r--r-- | public/ng/js/gogs.js | 18 | ||||
-rw-r--r-- | public/ng/less/gogs/settings.less | 16 |
3 files changed, 52 insertions, 8 deletions
diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index d81d6f3149..0840833755 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1403,14 +1403,16 @@ The register and sign-in page style #auth-setting-form, #org-setting-form, #repo-setting-form, -#user-profile-form { +#user-profile-form, +.repo-setting-form { background-color: #FFF; padding: 30px 0; } #auth-setting-form textarea, #org-setting-form textarea, #repo-setting-form textarea, -#user-profile-form textarea { +#user-profile-form textarea, +.repo-setting-form textarea { margin-left: 4px; height: 100px; } @@ -1418,24 +1420,38 @@ The register and sign-in page style #org-setting-form label, #repo-setting-form label, #user-profile-form label, +.repo-setting-form label, #auth-setting-form .form-label, #org-setting-form .form-label, #repo-setting-form .form-label, -#user-profile-form .form-label { +#user-profile-form .form-label, +.repo-setting-form .form-label { width: 240px; } #auth-setting-form .ipt, #org-setting-form .ipt, #repo-setting-form .ipt, -#user-profile-form .ipt { +#user-profile-form .ipt, +.repo-setting-form .ipt { width: 360px; } #auth-setting-form .field, #org-setting-form .field, #repo-setting-form .field, -#user-profile-form .field { +#user-profile-form .field, +.repo-setting-form .field { margin-bottom: 24px; } +#hook-type { + padding: 10px 0 0 0; + background-color: #fff; +} +#hook-type .field { + margin-bottom: 24px; +} +#hook-type label { + width: 240px; +} #repo-hooks-panel, #repo-hooks-history-panel, #user-social-panel, 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 +} diff --git a/public/ng/less/gogs/settings.less b/public/ng/less/gogs/settings.less index b246a947ec..80c00f2dbe 100644 --- a/public/ng/less/gogs/settings.less +++ b/public/ng/less/gogs/settings.less @@ -34,7 +34,8 @@ #auth-setting-form, #org-setting-form, #repo-setting-form, -#user-profile-form { +#user-profile-form, +.repo-setting-form { background-color: #FFF; padding: 30px 0; textarea { @@ -53,6 +54,17 @@ } } +#hook-type { + padding: 10px 0 0 0; + background-color: #fff; + .field { + margin-bottom: 24px; + } + label { + width: 240px; + } +} + #repo-hooks-panel, #repo-hooks-history-panel, #user-social-panel, @@ -109,4 +121,4 @@ .field { margin-bottom: 24px; } -}
\ No newline at end of file +} |