From 8ea8209c19ac57ef7e4c05ea21632cbccb47ceb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauris=20Buk=C5=A1is-Haberkorns?= Date: Sat, 19 May 2018 20:51:23 +0300 Subject: [PATCH] Minor UI improvements --- public/js/index.js | 3 +++ templates/repo/diff/comment_form.tmpl | 4 ++-- templates/repo/diff/comments.tmpl | 14 +++++++------- templates/repo/diff/new_review.tmpl | 4 +--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 4034853f03..3560686c26 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -788,6 +788,9 @@ function initPullRequestReview() { $('.btn-review').on('click', function(e) { e.preventDefault(); $(this).closest('.dropdown').find('.menu').toggle('visible'); + }).closest('.dropdown').find('.link.close').on('click', function(e) { + e.preventDefault(); + $(this).closest('.menu').toggle('visible'); }); $('.code-view .lines-code,.code-view .lines-num') diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 4e6d44220a..9b7397ecb1 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -27,9 +27,9 @@ {{else}} + {{end}} - diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 1c6d246013..18221e36ed 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -32,7 +32,7 @@
{{if .RenderedContent}} - {{.RenderedContent|Str2html}} + {{.RenderedContent|Str2html}} {{else}} {{$.root.i18n.Tr "repo.issues.no_content"}} {{end}} @@ -40,12 +40,12 @@
{{.Content}}
- {{$reactions := .Reactions.GroupByType}} - {{if $reactions}} -
- {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions }} -
- {{end}} + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} +
+ {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions }} +
+ {{end}}
{{end}} diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl index db993d443d..2b49ac7296 100644 --- a/templates/repo/diff/new_review.tmpl +++ b/templates/repo/diff/new_review.tmpl @@ -7,9 +7,7 @@
{{.CsrfTokenHtml}} -
- -
+
{{$.i18n.Tr "repo.diff.review.header"}}