1
1
Fork 0

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}} {{else}}
{{if $item.comment_firstcollapsed}} {{if $item.comment_firstcollapsed}}
{{if $item.thread_level<3}} {{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"> <span id="hide-comments-total-{{$item.id}}" class="hide-comments-total">
{{$item.num_comments}} - {{$item.show_text}} {{$item.num_comments}} - {{$item.show_text}}
</span> </span>
<span id="hide-comments-{{$item.id}}" class="hide-comments" style="display: none"> <span id="hide-comments-{{$item.id}}" class="hide-comments" style="display: none">
{{$item.num_comments}} - {{$item.hide_text}} {{$item.num_comments}} - {{$item.hide_text}}
</span> </span>
</div> </button>
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;"> <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
{{else}} {{else}}
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: block;"> <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; margin-top: 0;
} }
.hide-comments-outer { .hide-comments-outer {
display: block;
background-color: rgba(0, 0, 0, 0.03); background-color: rgba(0, 0, 0, 0.03);
padding: 0.5em; padding: 0.3em 10px;
border-radius: 0.5em 0.5em 0 0; width: 100%;
} border: none;
.hide-comments-total { text-align: left;
cursor: pointer;
} }
/* /*

View file

@ -28,29 +28,17 @@ as the value of $top_child_total (this is done at the end of this file)
{{if $mode == display}} {{if $mode == display}}
{{else}} {{else}}
{{if $item.comment_firstcollapsed}} {{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}} {{if $item.thread_level<3}}
<div class="hide-comments-outer-wrapper"> <button type="button" class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});">
<div class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});"> <span id="hide-comments-total-{{$item.id}}" class="hide-comments-total">
<span id="hide-comments-total-{{$item.id}}" class="hide-comments-total"> <i class="fa fa-caret-right" aria-hidden="true"></i>
<i class="fa fa-caret-right" aria-hidden="true"></i> {{$item.num_comments}} - {{$item.show_text}}
{{$item.num_comments}} - {{$item.show_text}} </span>
</span> <span id="hide-comments-{{$item.id}}" class="hide-comments" style="display: none">
<span id="hide-comments-{{$item.id}}" class="hide-comments" style="display: none"> <i class="fa fa-caret-down" aria-hidden="true"></i>
<i class="fa fa-caret-down" aria-hidden="true"></i> {{$item.num_comments}} - {{$item.hide_text}}
{{$item.num_comments}} - {{$item.hide_text}} </span>
</span> </button>
</div>
</div>
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;"> <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
{{else}} {{else}}
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: block;"> <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: block;">