]> source.dussan.org Git - gitea.git/commitdiff
Fix diff css style, hooks \r char
authorUnknwon <joe2010xtmf@163.com>
Sat, 11 Oct 2014 22:20:07 +0000 (18:20 -0400)
committerUnknwon <joe2010xtmf@163.com>
Sat, 11 Oct 2014 22:20:07 +0000 (18:20 -0400)
modules/git/hooks.go
templates/repo/diff.tmpl

index b8d15e5e7598c3c6d14cc1645e85639213459f7f..5b3c88a931d9bd21995869e8c993a6467152f301 100644 (file)
@@ -83,7 +83,7 @@ func (h *Hook) Update() error {
        if len(strings.TrimSpace(h.Content)) == 0 {
                return os.Remove(h.path)
        }
-       return ioutil.WriteFile(h.path, []byte(h.Content), os.ModePerm)
+       return ioutil.WriteFile(h.path, []byte(strings.Replace(h.Content, "\r", "", -1)), os.ModePerm)
 }
 
 // ListHooks returns a list of Git hooks of given repository.
index 30a983ac90d5690ad14f892138871f1eb8a50240..9dac1cac97ca61e3d17f8fad12681f30f6198902 100644 (file)
@@ -74,7 +74,7 @@
         </div>
 
         {{range .Diff.Files}}
-        <div class="panel diff-file-box diff-box file-content" id="diff-{{.Index}}">
+        <div class="panel panel-radius diff-file-box diff-box file-content" id="diff-{{.Index}}">
             <div class="panel-header">
                 <div class="diff-counter count pull-left">
                     {{if not .IsBin}}