From 1cd28a5ccf94ea9e914c00acf6923f4d385b87c3 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 11 Jul 2018 23:45:01 +0300 Subject: [PATCH] Fix sending msg:preview:toggle to server --- client/components/LinkPreviewToggle.vue | 2 +- client/components/MessageList.vue | 13 +++++++++++++ client/js/libs/handlebars/parse.js | 5 ----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/client/components/LinkPreviewToggle.vue b/client/components/LinkPreviewToggle.vue index 1354b0f7..ed5d2a14 100644 --- a/client/components/LinkPreviewToggle.vue +++ b/client/components/LinkPreviewToggle.vue @@ -15,7 +15,7 @@ export default { onClick: function() { this.link.shown = !this.link.shown; - this.$parent.$emit("linkPreviewToggle"); + this.$parent.$emit("linkPreviewToggle", this.link, this.$parent.message); } } }; diff --git a/client/components/MessageList.vue b/client/components/MessageList.vue index eaaae2c4..56d43516 100644 --- a/client/components/MessageList.vue +++ b/client/components/MessageList.vue @@ -35,6 +35,7 @@ @@ -43,6 +44,7 @@ diff --git a/client/js/libs/handlebars/parse.js b/client/js/libs/handlebars/parse.js index d67783a7..8e9cdf2e 100644 --- a/client/js/libs/handlebars/parse.js +++ b/client/js/libs/handlebars/parse.js @@ -156,11 +156,6 @@ module.exports = function parse(text, message = null, createElement = null) { props: { link: preview, }, - on: { - linkPreviewToggle() { - console.log('it got toggled!!!') - } - } }, fragments)]; //``;