[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
This commit is contained in:
Hypolite Petovan 2016-09-24 12:05:14 -04:00
parent f0e386bffb
commit 67dc6b0aac
2 changed files with 12 additions and 6 deletions

View File

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

View File

@ -285,7 +285,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{* Buttons for like and dislike *}}
{{if $item.vote}}
{{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 $item.vote.like AND $item.vote.dislike}}
@ -293,7 +293,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{/if}}
{{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 ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
@ -312,7 +312,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>
{{/if}}
{{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}}
</div>
@ -321,9 +321,9 @@ as the value of $top_child_total (this is done at the end of this file)
{{* Event attendance buttons *}}
{{if $item.isevent}}
<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" 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.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{{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{{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>
{{/if}}