diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-08-29 20:50:43 +0800 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-08-29 20:50:43 +0800 |
commit | d2aff9a46a20bfd5345fec8a88d2638997a833c0 (patch) | |
tree | f655789858cc809b080bcd49ee75824384e550a5 /public | |
parent | 904bf1a50b021798344f8e124439bdd6a4db9cfc (diff) | |
download | gitea-d2aff9a46a20bfd5345fec8a88d2638997a833c0.tar.gz gitea-d2aff9a46a20bfd5345fec8a88d2638997a833c0.zip |
Continue working on new admin pages
Diffstat (limited to 'public')
-rw-r--r-- | public/ng/css/gogs.css | 6 | ||||
-rw-r--r-- | public/ng/js/gogs.js | 29 | ||||
-rw-r--r-- | public/ng/less/gogs/settings.less | 1 |
3 files changed, 32 insertions, 4 deletions
diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 34d71028e7..d81d6f3149 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1400,31 +1400,37 @@ The register and sign-in page style .setting-content { margin-left: 32px; } +#auth-setting-form, #org-setting-form, #repo-setting-form, #user-profile-form { background-color: #FFF; padding: 30px 0; } +#auth-setting-form textarea, #org-setting-form textarea, #repo-setting-form textarea, #user-profile-form textarea { margin-left: 4px; height: 100px; } +#auth-setting-form label, #org-setting-form label, #repo-setting-form label, #user-profile-form label, +#auth-setting-form .form-label, #org-setting-form .form-label, #repo-setting-form .form-label, #user-profile-form .form-label { width: 240px; } +#auth-setting-form .ipt, #org-setting-form .ipt, #repo-setting-form .ipt, #user-profile-form .ipt { width: 360px; } +#auth-setting-form .field, #org-setting-form .field, #repo-setting-form .field, #user-profile-form .field { diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index 69ac380fd9..9fe0655528 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -429,13 +429,13 @@ function initTeamRepositoriesList() { function initAdmin() { // Create account. - $('#login-type').on("change",function(){ + $('#login-type').on("change", function () { var v = $(this).val(); - if(v.indexOf("0-")+1){ + if (v.indexOf("0-") + 1) { $('.auth-name').toggleHide(); - $(".pwd").find("input").attr("required","required") + $(".pwd").find("input").attr("required", "required") .end().toggleShow(); - }else{ + } else { $(".pwd").find("input").removeAttr("required") .end().toggleHide(); $('.auth-name').toggleShow(); @@ -450,6 +450,27 @@ function initAdmin() { var $form = $('user-profile-form'); $form.attr('action', $form.data('delete-url')); }); + // Create authorization. + $('#auth-type').on("change", function () { + var v = $(this).val(); + if (v == 2) { + $('.ldap').toggleShow(); + $('.smtp').toggleHide(); + } + if (v == 3) { + $('.smtp').toggleShow(); + $('.ldap').toggleHide(); + } + }); + // Delete authorization. + $('#auth-delete').click(function (e) { + if (!confirm('This authorization is going to be deleted, do you want to continue?')) { + e.preventDefault(); + return true; + } + var $form = $('auth-setting-form'); + $form.attr('action', $form.data('delete-url')); + }); } $(document).ready(function () { diff --git a/public/ng/less/gogs/settings.less b/public/ng/less/gogs/settings.less index cc922e3ffe..b246a947ec 100644 --- a/public/ng/less/gogs/settings.less +++ b/public/ng/less/gogs/settings.less @@ -31,6 +31,7 @@ margin-left: 32px; } +#auth-setting-form, #org-setting-form, #repo-setting-form, #user-profile-form { |