1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Finish new admin users pages

This commit is contained in:
Unknwon
2014-08-29 15:32:52 +08:00
parent 6558990e3a
commit 8829174574
25 changed files with 554 additions and 679 deletions

View File

@@ -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;

View File

@@ -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');

View File

@@ -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;

View File

@@ -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;
}
}