summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-11-23 04:53:50 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-11-26 23:56:03 +0100
commit107952ff0095e93691a3e0b546ead347dfc5d39c (patch)
tree1d6959aae5361c9d5508fcfaefb5a2f227dacc3b /apps
parent968da5ef23efa722163c0d5250d82a39367a1571 (diff)
downloadnextcloud-server-107952ff0095e93691a3e0b546ead347dfc5d39c.tar.gz
nextcloud-server-107952ff0095e93691a3e0b546ead347dfc5d39c.zip
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>
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/css/comments.css11
-rw-r--r--apps/comments/js/commentstabview.js8
2 files changed, 15 insertions, 4 deletions
diff --git a/apps/comments/css/comments.css b/apps/comments/css/comments.css
index 1ed418df2fc..14fa4316b5a 100644
--- a/apps/comments/css/comments.css
+++ b/apps/comments/css/comments.css
@@ -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;
}
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 7398a709421..c9fcc72e284 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -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}}' +