From d23594191a9af926cf0bab267287404c813288c3 Mon Sep 17 00:00:00 2001 From: Alexey Makhov Date: Fri, 13 Feb 2015 10:17:51 +0300 Subject: [PATCH] Merge with dev branch and resolve conflicts --- models/action.go | 2 +- public/ng/css/gogs.css | 6 +----- routers/repo/commit.go | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/models/action.go b/models/action.go index 658d288da..51e2845db 100644 --- a/models/action.go +++ b/models/action.go @@ -242,7 +242,7 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com } // If commit happened in the referenced repository, it means the issue can be closed. - if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, COMMENT_TYPE_REOPEN, "", nil); err != nil { + if _, err = CreateComment(userId, repoId, issue.Id, "", "", COMMENT_TYPE_REOPEN, "", nil); err != nil { return err } } diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index acd835105..67946f939 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1457,14 +1457,10 @@ The register and sign-in page style .code-view .lines-num span { font-family: Monaco, Menlo, Consolas, "Courier New", monospace; line-height: 20px; - padding: 0 15px; + padding: 0 10px; cursor: pointer; display: block; } - -.code-view .comment { - background-color: #fafafa; -} .code-view .lines-code > pre { border: none; border-left: 1px solid #ddd; diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 6c9e16300..54770be4b 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -267,7 +267,7 @@ func Diff(ctx *middleware.Context) { } comments[i].Poster = u - if comments[i].Type == models.COMMENT { + if comments[i].Type == models.COMMENT_TYPE_COMMENT { comments[i].Content = string(base.RenderMarkdown([]byte(comments[i].Content), ctx.Repo.RepoLink)) } @@ -393,7 +393,7 @@ func CreateCommitComment(ctx *middleware.Context) { if len(content) > 0 && lineRe.MatchString(line) { switch ctx.Params(":action") { case "new": - if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, 0, commitId, line, models.COMMENT, content, nil); err != nil { + if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, 0, commitId, line, models.COMMENT_TYPE_COMMENT, content, nil); err != nil { send(500, nil, err) return }