Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
b3737e3a
Commit
b3737e3a
authored
8 years ago
by
Phil Hughes
Browse files
Options
Downloads
Patches
Plain Diff
Added permalink button to pinned & starred messages
Fixes #3062
parent
2cadb67a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/rocketchat-message-pin/client/actionButton.coffee
+15
-0
15 additions, 0 deletions
packages/rocketchat-message-pin/client/actionButton.coffee
packages/rocketchat-message-star/client/actionButton.coffee
+16
-0
16 additions, 0 deletions
packages/rocketchat-message-star/client/actionButton.coffee
with
31 additions
and
0 deletions
packages/rocketchat-message-pin/client/actionButton.coffee
+
15
−
0
View file @
b3737e3a
...
...
@@ -58,3 +58,18 @@ Meteor.startup ->
RoomHistoryManager
.
getSurroundingMessages
(
message
,
50
)
order
:
100
RocketChat
.
MessageAction
.
addButton
id
:
'permalink-pinned'
icon
:
'icon-link'
i18nLabel
:
'Permalink'
classes
:
'clipboard'
context
:
[
'pinned'
]
action
:
(
event
,
instance
)
->
message
=
@
_arguments
[
1
]
msg
=
$
(
event
.
currentTarget
).
closest
(
'.message'
)[
0
]
$
(
"
\#
#{
msg
.
id
}
.message-dropdown"
).
hide
()
$
(
event
.
currentTarget
).
attr
(
'data-clipboard-text'
,
document
.
location
.
origin
+
document
.
location
.
pathname
+
'?msg='
+
msg
.
id
);
toastr
.
success
(
TAPi18n
.
__
(
'Copied'
))
order
:
101
This diff is collapsed.
Click to expand it.
packages/rocketchat-message-star/client/actionButton.coffee
+
16
−
0
View file @
b3737e3a
...
...
@@ -49,3 +49,19 @@ Meteor.startup ->
$
(
'.message-dropdown:visible'
).
hide
()
RoomHistoryManager
.
getSurroundingMessages
(
message
,
50
)
order
:
100
RocketChat
.
MessageAction
.
addButton
id
:
'permalink-star'
icon
:
'icon-link'
i18nLabel
:
'Permalink'
classes
:
'clipboard'
context
:
[
'starred'
]
action
:
(
event
,
instance
)
->
message
=
@
_arguments
[
1
]
msg
=
$
(
event
.
currentTarget
).
closest
(
'.message'
)[
0
]
$
(
"
\#
#{
msg
.
id
}
.message-dropdown"
).
hide
()
$
(
event
.
currentTarget
).
attr
(
'data-clipboard-text'
,
document
.
location
.
origin
+
document
.
location
.
pathname
+
'?msg='
+
msg
.
id
);
toastr
.
success
(
TAPi18n
.
__
(
'Copied'
))
order
:
101
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment