From a4df92e962ccf94f26ddd9b3ac79306f3059df8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?=
Date: Tue, 9 May 2023 22:28:02 +0200
Subject: [PATCH] add emojis on comments and pn
---
view/theme/frio/js/theme.js | 32 ++++++++++++++++++++++
view/theme/frio/templates/comment_item.tpl | 3 ++
view/theme/frio/templates/jot.tpl | 15 +---------
view/theme/frio/templates/prv_message.tpl | 5 ++++
4 files changed, 41 insertions(+), 14 deletions(-)
diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js
index 3846c2c3e3..28bc0c4332 100644
--- a/view/theme/frio/js/theme.js
+++ b/view/theme/frio/js/theme.js
@@ -941,4 +941,36 @@ function toggleDropdownText(elm) {
function hasClass(elem, cls) {
return (" " + elem.className + " ").indexOf(" " + cls + " ") > -1;
}
+
+function insertEmoji(target, item){
+ let dest = '';
+ switch (target) {
+ case 'comment':
+ dest='#comment-edit-text-' + item;
+ break;
+ case 'jot':
+ dest='.profile-jot-text';
+ break;
+ case 'pn':
+ dest='#comment-edit-text-input';
+ }
+ emojiPicker(dest)
+};
+
+function emojiPicker(dest) {
+ console.log(this);
+ if (typeof this.EmojiPicker == "undefined") {
+
+ new EmojiPicker({
+ trigger: [
+ {
+ selector: '.emojis',
+ insertInto: dest
+ }
+ ],
+ closeButton: true,
+ });
+ }
+ console.log(this);
+}
// @license-end
diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl
index 45a6116aa3..b9fc557833 100644
--- a/view/theme/frio/templates/comment_item.tpl
+++ b/view/theme/frio/templates/comment_item.tpl
@@ -36,6 +36,9 @@
+
diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl
index cf62a89f69..01475c8dc5 100644
--- a/view/theme/frio/templates/jot.tpl
+++ b/view/theme/frio/templates/jot.tpl
@@ -108,7 +108,7 @@
-
+
@@ -183,16 +183,3 @@ can load different content into the jot modal (e.g. the item edit jot)
-
diff --git a/view/theme/frio/templates/prv_message.tpl b/view/theme/frio/templates/prv_message.tpl
index ce61ffbe8c..3f9ac637df 100644
--- a/view/theme/frio/templates/prv_message.tpl
+++ b/view/theme/frio/templates/prv_message.tpl
@@ -59,6 +59,11 @@
+
+
+