Disable contacts menu for mentions to current user in comment messages
The contacts menu is not shown for avatars and user names in the author row if they represent the current user. For consistency, and because the contacts menu provides no value when shown for the current user, this commit also disables the contacts menu for mentions to the current user. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
8eb19a278c
commit
ea4414f9bc
|
@ -127,8 +127,8 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper,
|
||||
#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper .avatar,
|
||||
#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),
|
||||
#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,
|
||||
#commentsTabView .comment .authorRow .avatar:not(.currentUser),
|
||||
#commentsTabView .comment .authorRow .author:not(.currentUser) {
|
||||
cursor: pointer;
|
||||
|
|
|
@ -410,7 +410,10 @@
|
|||
var strong = $(this).next();
|
||||
var appendTo = $(this).parent();
|
||||
|
||||
$.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
|
||||
var username = $(this).data('username');
|
||||
if (username !== oc_current_user) {
|
||||
$.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -451,9 +454,11 @@
|
|||
+ ' data-user-display-name="'
|
||||
+ _.escape(displayName) + '"></div>';
|
||||
|
||||
var isCurrentUser = (uid === oc_current_user);
|
||||
|
||||
return ''
|
||||
+ '<span class="atwho-inserted" contenteditable="false">'
|
||||
+ '<span class="avatar-name-wrapper">'
|
||||
+ '<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">'
|
||||
+ avatar + ' <strong>'+ _.escape(displayName)+'</strong>'
|
||||
+ '</span>'
|
||||
+ '</span>';
|
||||
|
|
Loading…
Reference in New Issue