Finish new repo settings page

This commit is contained in:
Unknwon 2014-08-02 13:47:33 -04:00
parent 669552e255
commit 755eec745f
25 changed files with 502 additions and 347 deletions

View file

@ -851,6 +851,7 @@ The register and sign-in page style
color: #888888;
font-size: 1.6em;
font-weight: normal;
margin-bottom: 0;
}
#repo-header-name i {
margin-right: 12px;
@ -1211,6 +1212,9 @@ The register and sign-in page style
.code-view .lines-code > pre > ol.linenums > li.active {
background: #ffffdd;
}
.repo-setting-zone {
padding: 30px;
}
#setting-wrapper {
padding-bottom: 100px;
}
@ -1237,17 +1241,27 @@ The register and sign-in page style
.setting-content {
margin-left: 32px;
}
#repo-setting-form,
#user-profile-form {
background-color: #FFF;
padding: 30px 0;
}
#repo-setting-form textarea,
#user-profile-form textarea {
margin-left: 4px;
height: 100px;
}
#repo-setting-form label,
#user-profile-form label,
#repo-setting-form .form-label,
#user-profile-form .form-label {
width: 240px;
}
#repo-setting-form .ipt,
#user-profile-form .ipt {
width: 360px;
}
#repo-setting-form .field,
#user-profile-form .field {
margin-bottom: 24px;
}
@ -1298,3 +1312,101 @@ The register and sign-in page style
#user-ssh-add-form .field {
margin-bottom: 24px;
}
.repo-issue-wrapper {
padding: 18px 0;
}
.pr-main {
padding-right: 40px;
box-sizing: border-box;
}
.pr-sidebar {
border-left: 1px solid #DDD;
box-sizing: border-box;
}
#pr-sidebar-nav {
margin-top: 6px;
}
#pr-sidebar-nav li {
margin-bottom: 4px;
}
#pr-sidebar-nav li > a {
border: 1px solid transparent;
border-left: none;
}
#pr-sidebar-nav li > a:hover {
background-color: #FFF;
border-color: #DDD;
}
#pr-sidebar-nav .label {
font-size: 12px;
line-height: 1.4em;
margin-top: 1px;
}
#pr-sidebar-nav li.current a {
background-color: #FFF;
border-color: #DDD;
}
.pr-title .pr-num {
font-weight: normal;
color: #888;
}
.pr-meta {
color: #888;
}
.pr-meta .pr-author {
margin: 0 8px;
color: #444;
}
.pr-meta .pr-author:hover {
text-decoration: underline;
}
.pr-meta .pr-branch {
margin: 0 4px;
font-size: 12px;
padding: 4px 6px;
}
.pr-nav {
border-bottom: 1px solid #DDD;
margin-top: 16px;
}
.pr-nav .octicon {
margin-right: 4px;
}
.pr-nav li > a {
padding: 3px 9px !important;
border: 1px solid transparent;
border-bottom: none;
border-top-left-radius: .2em;
border-top-right-radius: .2em;
}
.pr-nav li > a .label {
padding: 1px 5px;
font-size: 12px;
margin-left: 4px;
}
.pr-nav li.current > a {
background-color: #FFF;
border-color: #E6E6E6;
}
.diff-bar .diff-add {
color: #65ad4e;
}
.diff-bar .diff-delete {
color: #d9453d;
}
.diff-bar .diff-status {
width: 50px;
background-color: #d9453d;
height: 10px;
margin-top: 7px;
margin-left: 4px;
margin-right: 4px;
border-radius: .2em;
}
.diff-bar .diff-status-inner {
width: 45%;
background-color: #65ad4e;
height: 10px;
border-top-left-radius: .2em;
border-bottom-left-radius: .2em;
}

View file

@ -173,12 +173,14 @@ svg:not(:root) {
label {
font-weight: bold;
}
textarea,
input,
.ipt {
padding: .6em;
line-height: normal;
border: 1px solid #bbbbbb;
}
textarea:focus,
input:focus,
.ipt:focus {
background-color: #f2fffc;
@ -290,6 +292,9 @@ pre {
overflow: auto;
padding: 0;
}
dt {
font-weight: bold;
}
.left {
float: left;
}
@ -651,6 +656,9 @@ ul.menu-radius > li:last-child > a {
background-color: #eeeeee;
border-bottom: 1px solid #cccccc;
}
.panel .panel-body {
background-color: white;
}
.panel .panel-body .panel-desc {
margin-bottom: 20px;
}

View file

@ -174,11 +174,31 @@ function initRepoCreate() {
console.log('initRepoCreate');
}
function initRepoSetting() {
// Confirmation of changing repository name.
$('#repo-setting-form').submit(function (e) {
var $reponame = $('#repo_name');
if (($reponame.data('repo-name') != $reponame.val()) && !confirm('Repository name has been changed, do you want to continue?')) {
e.preventDefault();
return true;
}
});
$('#transfer-button').click(function () {
$('#transfer-form').show();
});
$('#delete-button').click(function () {
$('#delete-form').show();
});
}
$(document).ready(function () {
initCore();
if ($('#repo-create-form').length || $('#repo-migrate-form').length) {
initRepoCreate();
}
if ($('#repo-setting').length) {
initRepoSetting();
}
Tabs('#dashboard-sidebar-menu');

View file

@ -4,4 +4,5 @@
@import "gogs/dashboard";
@import "gogs/sign";
@import "gogs/repository";
@import "gogs/settings";
@import "gogs/settings";
@import "gogs/issue";

View file

@ -8,6 +8,7 @@
border-bottom: 1px solid@panelBorderColor;
}
.panel-body {
background-color: white;
.panel-desc {
margin-bottom: 20px;
}

View file

@ -230,6 +230,7 @@ label {
font-weight: bold;
}
textarea,
input,
.ipt {
padding: .6em;
@ -374,3 +375,7 @@ pre {
overflow: auto;
padding: 0;
}
dt {
font-weight: bold;
}