finish issue edit content preview

This commit is contained in:
FuXiaoHei 2014-05-21 20:49:47 +08:00
parent 4e8a1bf9c9
commit 1331134316
4 changed files with 37 additions and 9 deletions

View file

@ -390,6 +390,10 @@ func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat
issue.AssigneeId = form.AssigneeId
issue.Labels = form.Labels
issue.Content = form.Content
// try get content from text, ignore conflict with preview ajax
if form.Content == "" {
issue.Content = ctx.Query("text")
}
if err = models.UpdateIssue(issue); err != nil {
ctx.Handle(500, "issue.UpdateIssue(UpdateIssue)", err)
return