Browse Source

Code quality improvement on JS

for-closed-social
Unknwon 8 years ago
parent
commit
7f7216be6e
7 changed files with 316 additions and 324 deletions
  1. +20
    -0
      public/config.codekit
  2. +10
    -4
      public/css/gogs.css
  3. +274
    -314
      public/js/gogs.js
  4. +10
    -0
      public/less/_editor.less
  5. +0
    -5
      public/less/_repository.less
  6. +1
    -0
      public/less/gogs.less
  7. +1
    -1
      templates/repo/editor/edit.tmpl

+ 20
- 0
public/config.codekit View File

@ -221,6 +221,26 @@
"strictMath": 0,
"strictUnits": 0
},
"\/less\/_editor.less": {
"allowInsecureImports": 0,
"createSourceMap": 0,
"disableJavascript": 0,
"fileType": 1,
"ieCompatibility": 1,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/less\/_editor.less",
"outputAbbreviatedPath": "\/css\/_editor.css",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 0,
"relativeURLS": 0,
"shouldRunAutoprefixer": 0,
"shouldRunBless": 0,
"strictImports": 0,
"strictMath": 0,
"strictUnits": 0
},
"\/less\/_emojify.less": {
"allowInsecureImports": 0,
"createSourceMap": 0,

+ 10
- 4
public/css/gogs.css View File

@ -1376,10 +1376,6 @@ footer .ui.language .menu {
.repository.file.editor .tabular.menu .octicon {
margin-right: 5px;
}
.repository.file.editor .CodeMirror.cm-s-default {
border-radius: 3px;
padding: 0 !important;
}
.repository.file.editor .commit-form-wrapper {
padding-left: 64px;
}
@ -2500,6 +2496,16 @@ footer .ui.language .menu {
tab-size: 16 !important;
-moz-tab-size: 16 !important;
}
.CodeMirror {
font: 14px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.CodeMirror.cm-s-default {
border-radius: 3px;
padding: 0 !important;
}
.CodeMirror .cm-comment {
background: inherit !important;
}
.organization {
padding-top: 15px;
padding-bottom: 80px;

+ 274
- 314
public/js/gogs.js
File diff suppressed because it is too large
View File


+ 10
- 0
public/less/_editor.less View File

@ -0,0 +1,10 @@
.CodeMirror {
font: 14px Consolas, "Liberation Mono", Menlo, Courier, monospace;
&.cm-s-default {
border-radius: 3px;
padding: 0 !important;
}
.cm-comment {
background: inherit !important;
}
}

+ 0
- 5
public/less/_repository.less View File

@ -326,11 +326,6 @@
}
}
.CodeMirror.cm-s-default {
border-radius: 3px;
padding: 0 !important;
}
.commit-form-wrapper {
padding-left: 64px;
.commit-avatar {

+ 1
- 0
public/less/gogs.less View File

@ -5,6 +5,7 @@
@import "_install";
@import "_form";
@import "_repository";
@import "_editor";
@import "_organization";
@import "_user";
@import "_dashboard";

+ 1
- 1
templates/repo/editor/edit.tmpl View File

@ -79,7 +79,7 @@
</label>
</div>
</div>
<div class="quick-pull-branch-name">
<div class="quick-pull-branch-name {{if not (eq .commit_choice "commit-to-new-branch")}}hide{{end}}">
<div class="new-branch-name-input{{if .Err_Branchname}} error{{end}}">
<i class="octicon octicon-git-branch" height="16" width="10"></i>
<input type="text" name="new_branch_name" value="{{.new_branch_name}}" class="form-control input-contrast mr-2 js-quick-pull-new-branch-name" placeholder="New branch name…">

Loading…
Cancel
Save