[frio] Add active class to responses current user holds

- Add active class when the self attribute is found
- Add CSS styling to active response links
2022.09-rc
Hypolite Petovan 2016-09-24 12:05:14 -04:00 zatwierdzone przez Tobias Diekershoff
rodzic 754de768f2
commit bdc7d1b87a
2 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -1504,9 +1504,15 @@ code > .hl-main {
margin-top: 15px; margin-top: 15px;
margin-bottom: 0; margin-bottom: 0;
} }
.wall-item-actions a.active {
font-weight: bold;
}
.wall-item-actions a:hover { .wall-item-actions a:hover {
color: #555; color: #555;
} }
.wall-item-actions a.active:hover {
color: $link_color;
}
.wall-item-actions-left { .wall-item-actions-left {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;

Wyświetl plik

@ -287,7 +287,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{* Buttons for like and dislike *}} {{* Buttons for like and dislike *}}
{{if $item.vote}} {{if $item.vote}}
{{if $item.vote.like}} {{if $item.vote.like}}
<a role="button" class="button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.1}}" onclick="dolike({{$item.id}},'like'); return false;"><i class="fa fa-thumbs-up"></i>&nbsp;{{$item.vote.like.1}}</a> <a role="button" class="button-likes{{if $item.responses.like.self}} active{{/if}}" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false;"><i class="fa fa-thumbs-up"></i>&nbsp;{{$item.vote.like.1}}</a>
{{/if}} {{/if}}
{{if $item.vote.like AND $item.vote.dislike}} {{if $item.vote.like AND $item.vote.dislike}}
@ -295,7 +295,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{/if}} {{/if}}
{{if $item.vote.dislike}} {{if $item.vote.dislike}}
<a role="button" class="button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.1}}" onclick="dolike({{$item.id}},'dislike'); return false;"><i class="fa fa-thumbs-down"></i>&nbsp;{{$item.vote.dislike.1}}</a> <a role="button" class="button-likes{{if $item.responses.dislike.self}} active{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;"><i class="fa fa-thumbs-down"></i>&nbsp;{{$item.vote.dislike.1}}</a>
{{/if}} {{/if}}
{{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}} {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
@ -314,7 +314,7 @@ as the value of $top_child_total (this is done at the end of this file)
<span role="presentation" class="separator">&nbsp;•&nbsp;</span> <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
{{/if}} {{/if}}
{{if $item.vote.share}} {{if $item.vote.share}}
<a role="button" class="button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</a> <a role="button" class="button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.1}}</a>
{{/if}} {{/if}}
{{/if}} {{/if}}
</div> </div>
@ -323,9 +323,9 @@ as the value of $top_child_total (this is done at the end of this file)
{{* Event attendance buttons *}} {{* Event attendance buttons *}}
{{if $item.isevent}} {{if $item.isevent}}
<div class="vote-event"> <div class="vote-event">
<a role="button" class="button-event" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></a> <a role="button" class="button-event{{if $item.responses.attendyes.self}} active{{/if}}" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></a>
<a role="button" class="button-event" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></a> <a role="button" class="button-event{{if $item.responses.attendno.self}} active{{/if}}" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></a>
<a role="button" class="button-event" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></a> <a role="button" class="button-event{{if $item.responses.attendmaybe.self}} active{{/if}}" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></a>
</div> </div>
{{/if}} {{/if}}