From f042b623bfbc41f3a60e30a1e5178df06e2aab4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= <danxuliu@gmail.com> Date: Wed, 2 May 2018 18:03:03 +0200 Subject: [PATCH 1/2] Disable contacts menu for mentions in the public view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The contacts menu can be shown only in user sessions; in the public view it just fails and shows an error message instead of any useful option, so now it is disabled for mentions in the public view. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> --- js/views/chatview.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/views/chatview.js b/js/views/chatview.js index f9d8728f4f5..393c5d82409 100644 --- a/js/views/chatview.js +++ b/js/views/chatview.js @@ -412,6 +412,11 @@ }, _postRenderMessage: function($el) { + // Contacts menu is not shown in public view. + if (!OC.getCurrentUser().uid) { + return; + } + $el.find('.mention-user').each(function() { var $this = $(this); From 04bd3079100bf68684d18dee422542c1e2a686ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= <danxuliu@gmail.com> Date: Wed, 2 May 2018 18:05:40 +0200 Subject: [PATCH 2/2] Do not show pointer cursor on mentions without contacts menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mentions in the public view and mentions in the new message form do not show the contacts menu when clicked, so the cursor should be the default one instead of the pointer cursor. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> --- css/comments.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/comments.scss b/css/comments.scss index 139a70066be..52ef5eeeb6b 100644 --- a/css/comments.scss +++ b/css/comments.scss @@ -257,7 +257,7 @@ body:not(#body-public) #commentsTabView .comment .authorRow:not(.currentUser):no color: $color-primary-text; } -#commentsTabView .comment .message .mention-user:not(.current-user) { +body:not(#body-public) #commentsTabView .comment:not(.newCommentRow) .message .mention-user:not(.current-user) { cursor: pointer; }