summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-29 15:32:52 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-29 15:32:52 +0800
commit88291745747ffb200b55ca62e1054d1d2c4315d3 (patch)
tree493d0cfe13d53c0720a25d30ced2b0d8d4f39d1a /public
parent6558990e3a1e3d5aac595e0f0b525a834d708647 (diff)
downloadgitea-88291745747ffb200b55ca62e1054d1d2c4315d3.tar.gz
gitea-88291745747ffb200b55ca62e1054d1d2c4315d3.zip
Finish new admin users pages
Diffstat (limited to 'public')
-rw-r--r--public/ng/css/gogs.css20
-rw-r--r--public/ng/js/gogs.js28
-rw-r--r--public/ng/less/gogs/admin.less5
-rw-r--r--public/ng/less/gogs/base.less41
4 files changed, 78 insertions, 16 deletions
diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css
index dac5870064..34d71028e7 100644
--- a/public/ng/css/gogs.css
+++ b/public/ng/css/gogs.css
@@ -249,9 +249,22 @@ img.avatar-100 {
padding: 8px;
vertical-align: top;
}
-th {
+.table th {
text-align: left;
}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+ background-color: #f9f9f9;
+}
+.pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+}
+.pagination li {
+ display: inline;
+}
.markdown {
background-color: white;
font-size: 16px;
@@ -1925,11 +1938,14 @@ textarea#issue-add-content {
height: 40px;
line-height: 40px;
}
+.admin-panel {
+ padding: 10px 20px;
+}
.admin-desc {
padding: 10px 20px;
}
.admin-table {
- padding: 15px 20px 5px 20px;
+ padding: 15px 0 5px 0;
}
.dl-horizontal dt {
float: left;
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js
index d4c3224eee..69ac380fd9 100644
--- a/public/ng/js/gogs.js
+++ b/public/ng/js/gogs.js
@@ -427,6 +427,31 @@ function initTeamRepositoriesList() {
});
}
+function initAdmin() {
+ // Create account.
+ $('#login-type').on("change",function(){
+ var v = $(this).val();
+ if(v.indexOf("0-")+1){
+ $('.auth-name').toggleHide();
+ $(".pwd").find("input").attr("required","required")
+ .end().toggleShow();
+ }else{
+ $(".pwd").find("input").removeAttr("required")
+ .end().toggleHide();
+ $('.auth-name').toggleShow();
+ }
+ });
+ // Delete account.
+ $('#user-delete').click(function (e) {
+ if (!confirm('This account is going to be deleted, do you want to continue?')) {
+ e.preventDefault();
+ return true;
+ }
+ var $form = $('user-profile-form');
+ $form.attr('action', $form.data('delete-url'));
+ });
+}
+
$(document).ready(function () {
initCore();
if ($('#user-profile-setting').length) {
@@ -453,6 +478,9 @@ $(document).ready(function () {
if ($('#team-repositories-list').length) {
initTeamRepositoriesList();
}
+ if ($('#admin-setting').length) {
+ initAdmin();
+ }
Tabs('#dashboard-sidebar-menu');
diff --git a/public/ng/less/gogs/admin.less b/public/ng/less/gogs/admin.less
index d327f681fd..010e0f06f6 100644
--- a/public/ng/less/gogs/admin.less
+++ b/public/ng/less/gogs/admin.less
@@ -1,8 +1,11 @@
+.admin-panel {
+ padding: 10px 20px;
+}
.admin-desc {
padding: 10px 20px;
}
.admin-table {
- padding: 15px 20px 5px 20px;
+ padding: 15px 0 5px 0;
}
.dl-horizontal dt {
float: left;
diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less
index 7ef7d24ccd..0ca733c519 100644
--- a/public/ng/less/gogs/base.less
+++ b/public/ng/less/gogs/base.less
@@ -254,18 +254,33 @@ clear: both;
.table {
width: 100%;
max-width: 100%;
+ > thead > tr > th,
+ > tbody > tr > th,
+ > tfoot > tr > th,
+ > thead > tr > td,
+ > tbody > tr > td,
+ > tfoot > tr > td {
+ border-top: 1px solid #e7eaec;
+ line-height: 1.42857;
+ padding: 8px;
+ vertical-align: top;
+ }
+ th {
+ text-align: left;
+ }
+}
+.table-striped {
+ >tbody>tr:nth-child(odd)>td,
+ >tbody>tr:nth-child(odd)>th {
+ background-color: #f9f9f9;
+ }
}
-.table > thead > tr > th,
-.table > tbody > tr > th,
-.table > tfoot > tr > th,
-.table > thead > tr > td,
-.table > tbody > tr > td,
-.table > tfoot > tr > td {
- border-top: 1px solid #e7eaec;
- line-height: 1.42857;
- padding: 8px;
- vertical-align: top;
-}
-th {
- text-align: left;
+.pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+ li {
+ display: inline;
+ }
} \ No newline at end of file