Skip to content

Commit

Permalink
Merge pull request #9241 from RocketChat/show-announcement-modal
Browse files Browse the repository at this point in the history
[FIX] Show modal with announcement
  • Loading branch information
rodrigok committed Dec 26, 2017
2 parents c6cf840 + 3084766 commit d8886d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,7 @@
height: 40px;
padding: 0 20px;

cursor: pointer;
text-align: center;
white-space: nowrap;
text-overflow: ellipsis;
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui/client/views/app/room.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2>
<div class="messages-container-main">
{{#unless embeddedVersion}}
{{#if showAnnouncement}}
<div class="fixed-title announcement" title="{{RocketChatMarkdown roomAnnouncement}}">
<div class="fixed-title announcement" aria-label="{{RocketChatMarkdown roomAnnouncement}}">
{{{RocketChatMarkdown roomAnnouncement}}}
</div>
{{/if}}
Expand Down
9 changes: 9 additions & 0 deletions packages/rocketchat-ui/client/views/app/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,15 @@ Template.room.events({
removeClass.forEach(message => $(`.messages-box #${ message }`).removeClass('selected'));
addClass.forEach(message => $(`.messages-box #${ message }`).addClass('selected'));
}
},
'click .announcement'(e) {
modal.open({
title: t('Announcement'),
text: $(e.target).attr('aria-label'),
showConfirmButton: false,
showCancelButton: true,
cancelButtonText: t('Close')
});
}
});

Expand Down

0 comments on commit d8886d4

Please sign in to comment.