summaryrefslogtreecommitdiffstats
path: root/webapp/components/rhs_comment.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmood@users.noreply.github.com>2016-12-12 20:17:20 +0500
committerJoram Wilander <jwawilander@gmail.com>2016-12-12 10:17:20 -0500
commit32842be3094237d6dffe41b52b24b2d04f85576e (patch)
tree0125c99465fa4b6b73dbac6d4e25a9467ff3a142 /webapp/components/rhs_comment.jsx
parent30a10d35a8406f4af96fcc8200c4e2173856837d (diff)
downloadchat-32842be3094237d6dffe41b52b24b2d04f85576e.tar.gz
chat-32842be3094237d6dffe41b52b24b2d04f85576e.tar.bz2
chat-32842be3094237d6dffe41b52b24b2d04f85576e.zip
Multiple Ui improvements (#4767)
* PLT-4911 - Adding new target for OAuth help links * PLT-4953 - Fixing styles for the unread messages indicator * PLT-4901 - Fixing header modal overlap on mobile * PLT-4916 - Swapping position of edit and delete
Diffstat (limited to 'webapp/components/rhs_comment.jsx')
-rw-r--r--webapp/components/rhs_comment.jsx38
1 files changed, 19 insertions, 19 deletions
diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 8b5d56c01..c699fb353 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -166,49 +166,49 @@ export default class RhsComment extends React.Component {
</li>
);
- if (isOwner) {
+ if (isOwner || isAdmin) {
dropdownContents.push(
<li
role='presentation'
- key='edit-button'
+ key='delete-button'
>
<a
href='#'
role='menuitem'
- data-toggle='modal'
- data-target='#edit_post'
- data-refocusid='#reply_textbox'
- data-title={Utils.localizeMessage('rhs_comment.comment', 'Comment')}
- data-message={post.message}
- data-postid={post.id}
- data-channelid={post.channel_id}
+ onClick={(e) => {
+ e.preventDefault();
+ GlobalActions.showDeletePostModal(post, 0);
+ }}
>
<FormattedMessage
- id='rhs_comment.edit'
- defaultMessage='Edit'
+ id='rhs_comment.del'
+ defaultMessage='Delete'
/>
</a>
</li>
);
}
- if (isOwner || isAdmin) {
+ if (isOwner) {
dropdownContents.push(
<li
role='presentation'
- key='delete-button'
+ key='edit-button'
>
<a
href='#'
role='menuitem'
- onClick={(e) => {
- e.preventDefault();
- GlobalActions.showDeletePostModal(post, 0);
- }}
+ data-toggle='modal'
+ data-target='#edit_post'
+ data-refocusid='#reply_textbox'
+ data-title={Utils.localizeMessage('rhs_comment.comment', 'Comment')}
+ data-message={post.message}
+ data-postid={post.id}
+ data-channelid={post.channel_id}
>
<FormattedMessage
- id='rhs_comment.del'
- defaultMessage='Delete'
+ id='rhs_comment.edit'
+ defaultMessage='Edit'
/>
</a>
</li>