diff --git a/app/action-links/client/index.js b/app/action-links/client/index.js index c09886562a2d..89bf0fccfb2c 100644 --- a/app/action-links/client/index.js +++ b/app/action-links/client/index.js @@ -1,6 +1,4 @@ import { actionLinks } from './lib/actionLinks'; -import './init'; -import './stylesheets/actionLinks.css'; export { actionLinks, diff --git a/app/action-links/client/init.js b/app/action-links/client/init.js deleted file mode 100644 index f21776e7c2c0..000000000000 --- a/app/action-links/client/init.js +++ /dev/null @@ -1,33 +0,0 @@ -import { Blaze } from 'meteor/blaze'; -import { Template } from 'meteor/templating'; - -import { handleError } from '../../utils/client'; -import { fireGlobalEvent, Layout } from '../../ui-utils/client'; -import { messageArgs } from '../../ui-utils/client/lib/messageArgs'; -import { actionLinks } from './lib/actionLinks'; - - -Template.roomOld.events({ - 'click [data-actionlink]'(event, instance) { - event.preventDefault(); - event.stopPropagation(); - - const data = Blaze.getData(event.currentTarget); - const { msg } = messageArgs(data); - if (Layout.isEmbedded()) { - return fireGlobalEvent('click-action-link', { - actionlink: $(event.currentTarget).data('actionlink'), - value: msg._id, - message: msg, - }); - } - - if (msg._id) { - actionLinks.run($(event.currentTarget).data('actionlink'), msg._id, instance, (err) => { - if (err) { - handleError(err); - } - }); - } - }, -}); diff --git a/app/action-links/client/stylesheets/actionLinks.css b/app/action-links/client/stylesheets/actionLinks.css deleted file mode 100644 index 1b5a9977c5f2..000000000000 --- a/app/action-links/client/stylesheets/actionLinks.css +++ /dev/null @@ -1,32 +0,0 @@ -.message { - & .actionLinks { - margin-top: 4px; - margin-bottom: 4px; - padding: 0; - - text-align: center; - - & li { - position: relative; - - display: inline; - - padding-right: 2px; - - list-style: none; - - cursor: pointer; - - & .action-link { - margin: 0 2px; - padding: 5px; - - border-radius: 7px; - } - } - - & li:last-child::after { - content: none; - } - } -} diff --git a/app/ui-message/client/message.html b/app/ui-message/client/message.html index 57f2f8bb16f1..9d6d752e7591 100644 --- a/app/ui-message/client/message.html +++ b/app/ui-message/client/message.html @@ -149,22 +149,7 @@ {{/unless}} {{#unless hideActionLinks}} - + {{> MessageActions mid=msg._id actions=actionLinks runAction=(actions.runAction msg)}} {{/unless}} {{#unless hideReactions}}