Permalink
Browse files

comment.compact: Implement missing show replies contest mode function…

…ality.
  • Loading branch information...
1 parent a83f03c commit 811db5937e19b3bf26eede4891277efea8c15eda @andre-d andre-d committed with kemitche Dec 17, 2013
Showing with 20 additions and 4 deletions.
  1. +9 −0 r2/r2/public/static/css/compact.css
  2. +11 −4 r2/r2/templates/comment.compact
@@ -587,6 +587,15 @@ a.author { margin-right: 0.5em; }
.linkflair { font-weight: normal; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.commentspacer {
+ clear: both;
+}
+
+.showreplies {
+ padding: 0;
+ margin-left: 40px;
+}
+
.notice-taken, .notice-available {
display: none;
line-height: 16px;
@@ -98,8 +98,15 @@
%endif
</div>
</div>
- <div style="clear: both"></div>
- <div class="child">
- ${thing.childlisting}
- </div>
+ <div class="commentspacer"></div>
+ %if thing.link.contest_mode and hasattr(thing, "child") and not thing.parent_id:
+ <button class="showreplies newbutton"
+ onclick="$(this).hide();$(this).parent().find('.noncollapsed').show();return false;">
+ ${_("show replies")}
+ </button>
+ <div class="child noncollapsed" style="display:none">
+ %else:
+ <div class="child">
+ %endif
+ ${thing.childlisting}</div>
</div>

0 comments on commit 811db59

Please sign in to comment.