# HG changeset patch # User Steve Losh # Date 1276402855 14400 # Node ID 17ad8036c6e21477301322b8f395e237d5f71588 # Parent 4a6d47faac1654b3fe52cb0a5cb756c62f7276d4 web: yep, more styles diff -r 4a6d47faac16 -r 17ad8036c6e2 review/static/style.css --- a/review/static/style.css Sat Jun 12 23:53:18 2010 -0400 +++ b/review/static/style.css Sun Jun 13 00:20:55 2010 -0400 @@ -381,26 +381,44 @@ font-style: italic; color: #888888; } -#changeset .content .review-level-comments { +#changeset .content .item-listing { background-color: #faf9ef; border: 1px solid #ccc; margin-bottom: 14px; } -#changeset .content .review-level-comments .comment { +#changeset .content .item-listing .comment, #changeset .content .item-listing .signoff { padding: 10px 10px 12px; border-top: 1px solid #fff; border-bottom: 1px solid #ddd; } -#changeset .content .review-level-comments .comment:first-child { +#changeset .content .item-listing .comment:first-child, #changeset .content .item-listing .signoff:first-child { border-top: none; } -#changeset .content .review-level-comments .comment:last-child { +#changeset .content .item-listing .comment:last-child, #changeset .content .item-listing .signoff:last-child { border-bottom: none; } -#changeset .content .review-level-comments .comment img { +#changeset .content .item-listing .comment img, #changeset .content .item-listing .signoff img { float: right; } -#changeset .content .review-level-comments .comment .message { +#changeset .content .item-listing .comment .signoff-opinion, #changeset .content .item-listing .signoff .signoff-opinion { + float: right; + font: bold 52px/1 "Helvetica Neue", HelveticaNeue, Arial, Helvetica, sans-serif; + text-transform: capitalize; + margin-right: 15px; +} +#changeset .content .item-listing .comment .signoff-opinion.yes, #changeset .content .item-listing .signoff .signoff-opinion.yes { + color: #568019; +} +#changeset .content .item-listing .comment .signoff-opinion.no, #changeset .content .item-listing .signoff .signoff-opinion.no { + color: #c00; +} +#changeset .content .item-listing .comment .signoff-opinion.neutral, #changeset .content .item-listing .signoff .signoff-opinion.neutral { + color: #bab994; +} +#changeset .content .item-listing .comment .author .opinion, #changeset .content .item-listing .signoff .author .opinion { + font-weight: bold; +} +#changeset .content .item-listing .comment .message, #changeset .content .item-listing .signoff .message { background-color: #fefefd; border: 1px solid #eee; font-family: Monaco, Consolas, "Courier New", monospace; @@ -408,54 +426,12 @@ padding: 10px; width: 650px; } +#changeset .content .item-listing .signoff .message { + width: 500px; +} #changeset .content .add-review-comment { margin-bottom: 40px; } -#changeset .content .signoffs { - background-color: #faf9ef; - border: 1px solid #ccc; - margin-bottom: 14px; -} -#changeset .content .signoffs .signoff { - padding: 10px 10px 12px; - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; -} -#changeset .content .signoffs .signoff:first-child { - border-top: none; -} -#changeset .content .signoffs .signoff:last-child { - border-bottom: none; -} -#changeset .content .signoffs .signoff .avatar { - float: right; -} -#changeset .content .signoffs .signoff .signoff-opinion { - float: right; - font: bold 52px/1 "Helvetica Neue", HelveticaNeue, Arial, Helvetica, sans-serif; - text-transform: capitalize; - margin-right: 15px; -} -#changeset .content .signoffs .signoff .signoff-opinion.yes { - color: #568019; -} -#changeset .content .signoffs .signoff .signoff-opinion.no { - color: #c00; -} -#changeset .content .signoffs .signoff .signoff-opinion.neutral { - color: #bab994; -} -#changeset .content .signoffs .signoff .author .opinion { - font-weight: bold; -} -#changeset .content .signoffs .signoff .message { - background-color: #fefefd; - border: 1px solid #eee; - font-family: Monaco, Consolas, "Courier New", monospace; - font-size: 12px; - padding: 10px; - width: 500px; -} #changeset .content .add-signoff { margin-bottom: 40px; } @@ -463,3 +439,9 @@ font-weight: bold; margin-bottom: 0; } +#changeset .content .file .filename h3 a { + color: #292620; +} +#changeset .content .file .add-file-comment { + margin-bottom: 24px; +} diff -r 4a6d47faac16 -r 17ad8036c6e2 review/static/style.less --- a/review/static/style.less Sat Jun 12 23:53:18 2010 -0400 +++ b/review/static/style.less Sun Jun 13 00:20:55 2010 -0400 @@ -322,12 +322,12 @@ color: @c-light; } - .review-level-comments { + .item-listing { background-color: @c-soft-cream; border: 1px solid #ccc; margin-bottom: 14px; - .comment { + .comment, .signoff { padding: 10px 10px 12px; border-top: 1px solid #fff; border-bottom: 1px solid #ddd; @@ -341,39 +341,6 @@ img { float: right; } - .message { - background-color: lighten(@c-soft-cream, 4%); - border: 1px solid #eee; - font-family: @font-mono; - font-size: 12px; - padding: 10px; - width: 650px; - } - } - } - .add-review-comment { - margin-bottom: 40px; - } - - .signoffs { - background-color: @c-soft-cream; - border: 1px solid #ccc; - margin-bottom: 14px; - - .signoff { - padding: 10px 10px 12px; - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; - - &:first-child { - border-top: none; - } - &:last-child { - border-bottom: none; - } - .avatar { - float: right; - } .signoff-opinion { float: right; font: bold 52px/1 @font-normal; @@ -395,10 +362,17 @@ font-family: @font-mono; font-size: 12px; padding: 10px; - width: 500px; + width: 650px; } } + .signoff .message { + width: 500px; + } } + .add-review-comment { + margin-bottom: 40px; + } + .add-signoff { margin-bottom: 40px; @@ -409,4 +383,17 @@ } } } + + .file { + .filename { + h3 { + a { + color: @c-dark; + } + } + } + .add-file-comment { + margin-bottom: 24px; + } + } } diff -r 4a6d47faac16 -r 17ad8036c6e2 review/static/ui.js --- a/review/static/ui.js Sat Jun 12 23:53:18 2010 -0400 +++ b/review/static/ui.js Sun Jun 13 00:20:55 2010 -0400 @@ -1,14 +1,18 @@ $(function() { - $("a.fold-file").toggle(function(event) { - $(event.target).closest("div.file-review").find("div.file-review-contents").slideUp("fast"); - $(event.target).html("   ←").addClass("unfold-file").removeClass("fold-file"); + $("a.fold").toggle(function(event) { + $(event.target).closest(".file") + .find(".file-review-contents") + .slideUp("fast", function () { + $(event.target).closest("h3").find(".status").html("→"); + }); return false; }, function(event) { - $(event.target).closest("div.file-review").find("div.file-review-contents").slideDown("fast"); - $(event.target).html("   ↓").addClass("fold-file").removeClass("unfold-file"); + $(event.target).closest(".file").find(".file-review-contents").slideDown("fast", function() { + $(event.target).closest("h3").find(".status").html("↓"); + }); return false; }); -}); \ No newline at end of file +}); diff -r 4a6d47faac16 -r 17ad8036c6e2 review/templates/changeset.html --- a/review/templates/changeset.html Sat Jun 12 23:53:18 2010 -0400 +++ b/review/templates/changeset.html Sun Jun 13 00:20:55 2010 -0400 @@ -14,7 +14,7 @@ {% set comments = rcset.review_level_comments() %} {% if comments %} -
+
{% for comment in comments %}
{{ macros.gravatar(comment, utils) }} @@ -53,7 +53,7 @@ {% set signoffs = rcset.signoffs %} {% if signoffs %} -
+
{% for signoff in signoffs %}
{{ macros.gravatar(signoff, utils) }} @@ -92,12 +92,10 @@
- +
- + Add Signoff + Cancel
{% endif %} @@ -105,40 +103,46 @@

Files

{% for filename in rcset.files() %} -
-
-    ↓ -

{{ filename }}

+
+
- {% for comment in rcset.file_level_comments(filename) %} -
- {{ macros.gravatar(comment, utils) }} -
- -
{{ comment.message }}
-
-
- {% endfor %} + {% with %} + {% set comments = rcset.file_level_comments(filename) %} + {% if comments %} +
+ {% for comment in comments %} +
+ {{ macros.gravatar(comment, utils) }} +
+ +
{{ comment.message }}
+
+
+ {% endfor %} +
+ {% endif %} + {% endwith %} {% if not read_only %} -
-

Add a comment on this file

+
+ Add a comment on this file -
+
- - + +
-
- - Cancel -
+ + Post Comment + Cancel +