Turn show comments element into a full-fledged button

This commit is contained in:
Hypolite Petovan 2022-12-27 14:02:53 -05:00
parent e0241c36ef
commit dbc4e52fc4
3 changed files with 17 additions and 29 deletions

View File

@ -2,14 +2,14 @@
{{else}}
{{if $item.comment_firstcollapsed}}
{{if $item.thread_level<3}}
<div class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});">
<button type="button" class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});">
<span id="hide-comments-total-{{$item.id}}" class="hide-comments-total">
{{$item.num_comments}} - {{$item.show_text}}
</span>
<span id="hide-comments-{{$item.id}}" class="hide-comments" style="display: none">
{{$item.num_comments}} - {{$item.hide_text}}
</span>
</div>
</button>
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
{{else}}
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: block;">

View File

@ -2069,12 +2069,12 @@ wall-item-comment-wrapper.well hr {
margin-top: 0;
}
.hide-comments-outer {
display: block;
background-color: rgba(0, 0, 0, 0.03);
padding: 0.5em;
border-radius: 0.5em 0.5em 0 0;
}
.hide-comments-total {
cursor: pointer;
padding: 0.3em 10px;
width: 100%;
border: none;
text-align: left;
}
/*

View File

@ -28,19 +28,8 @@ as the value of $top_child_total (this is done at the end of this file)
{{if $mode == display}}
{{else}}
{{if $item.comment_firstcollapsed}}
{{*
<div align="center" style="margin-top:-34px;">
<div class="hide-comments-outer btn btn-default" onclick="showHideComments({{$item.id}});">
<span id="hide-comments-total-{{$item.id}}" class="hide-comments-total">{{$item.num_comments}}</span>
<span id="hide-comments-{{$item.id}}" class="hide-comments fakelink">{{$item.hide_text}}</span>
</div>
</div>
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
*}}
{{if $item.thread_level<3}}
<div class="hide-comments-outer-wrapper">
<div class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});">
<button type="button" class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});">
<span id="hide-comments-total-{{$item.id}}" class="hide-comments-total">
<i class="fa fa-caret-right" aria-hidden="true"></i>
{{$item.num_comments}} - {{$item.show_text}}
@ -49,8 +38,7 @@ as the value of $top_child_total (this is done at the end of this file)
<i class="fa fa-caret-down" aria-hidden="true"></i>
{{$item.num_comments}} - {{$item.hide_text}}
</span>
</div>
</div>
</button>
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
{{else}}
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: block;">