Fix cursor for author row and avatars in comments

When it was on an author row the cursor was shown as a pointer, even if
clicking on the author row itself does nothing. On the other hand,
avatars used the default cursor, even if clicking on them either shows
the contacts menu (in the case of the author row, only when the avatar
is for a different user than the current one) or inserts a mention (for
avatars shown in the list of suggested mentions), depending on the case.

Now, the author row uses the default cursor, and avatars (and their
associated user name) use a pointer cursor if clicking on them will
trigger an action (either showing the contacts menu or inserting a
mention).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2017-11-23 04:53:50 +01:00
parent 968da5ef23
commit 107952ff00
2 changed files with 15 additions and 4 deletions

View File

@ -125,6 +125,17 @@
.atwho-view-ul * .avatar-name-wrapper,
#commentsTabView .comment .authorRow {
position: relative;
}
#commentsTabView .comment .message .avatar-name-wrapper,
#commentsTabView .comment .message .avatar-name-wrapper .avatar,
#commentsTabView .comment .authorRow .avatar:not(.currentUser),
#commentsTabView .comment .authorRow .author:not(.currentUser) {
cursor: pointer;
}
.atwho-view-ul .avatar-name-wrapper,
.atwho-view-ul .avatar-name-wrapper .avatar {
cursor: pointer;
}

View File

@ -23,8 +23,8 @@
var EDIT_COMMENT_TEMPLATE =
'<div class="newCommentRow comment" data-id="{{id}}">' +
' <div class="authorRow">' +
' <div class="avatar" data-username="{{actorId}}"></div>' +
' <div class="author">{{actorDisplayName}}</div>' +
' <div class="avatar currentUser" data-username="{{actorId}}"></div>' +
' <div class="author currentUser">{{actorDisplayName}}</div>' +
'{{#if isEditMode}}' +
' <a href="#" class="action delete icon icon-delete has-tooltip" title="{{deleteTooltip}}"></a>' +
'{{/if}}' +
@ -42,8 +42,8 @@
var COMMENT_TEMPLATE =
'<li class="comment{{#if isUnread}} unread{{/if}}{{#if isLong}} collapsed{{/if}}" data-id="{{id}}">' +
' <div class="authorRow">' +
' <div class="avatar" {{#if actorId}}data-username="{{actorId}}"{{/if}}> </div>' +
' <div class="author">{{actorDisplayName}}</div>' +
' <div class="avatar{{#if isUserAuthor}} currentUser{{/if}}" {{#if actorId}}data-username="{{actorId}}"{{/if}}> </div>' +
' <div class="author{{#if isUserAuthor}} currentUser{{/if}}">{{actorDisplayName}}</div>' +
'{{#if isUserAuthor}}' +
' <a href="#" class="action edit icon icon-rename has-tooltip" title="{{editTooltip}}"></a>' +
'{{/if}}' +