From 6436d2cd8ac17198704129208d1f0e499f1cd83c Mon Sep 17 00:00:00 2001
From: =?utf8?q?Jakobus=20Sch=C3=BCrz?= <jakobus.schuerz@schuerz.at>
Date: Fri, 17 Mar 2023 10:49:12 +0100
Subject: [PATCH] changes in case of code-review

---
 src/Content/Conversation.php               |  1 -
 view/js/dropzone-factory.js                | 12 ++++++------
 view/theme/frio/templates/comment_item.tpl |  8 ++++----
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php
index f23333911b..249190b1ad 100644
--- a/src/Content/Conversation.php
+++ b/src/Content/Conversation.php
@@ -408,7 +408,6 @@ class Conversation
 
 			'$compose_link_title'  => $this->l10n->t('Open Compose page'),
 			'$always_open_compose' => $this->pConfig->get($this->session->getLocalUserId(), 'frio', 'always_open_compose', false),
-
 		]);
 
 
diff --git a/view/js/dropzone-factory.js b/view/js/dropzone-factory.js
index a3a3e6c362..21ea5ebbc2 100644
--- a/view/js/dropzone-factory.js
+++ b/view/js/dropzone-factory.js
@@ -1,6 +1,6 @@
 var DzFactory = function () {
-	this.createDropzone = function(dropSelector, textareaSelector) {
-		return new Dropzone( dropSelector, {
+	this.createDropzone = function(dropSelector, textareaElementId) {
+		return new Dropzone(dropSelector, {
 			paramName: 'userfile', // The name that will be used to transfer the file
 			maxFilesize: max_imagesize, // MB
 			url: '/media/photo/upload?response=url&album=',
@@ -12,7 +12,7 @@ var DzFactory = function () {
 			},
 			init: function() {
 				this.on('success', function(file, serverResponse) {
-					const targetTextarea = document.getElementById(textareaSelector);
+					const targetTextarea = document.getElementById(textareaElementId);
 					const bbcodeString = $(serverResponse).find('div#content').text();
 					if (targetTextarea.setRangeText) {
 						//if setRangeText function is supported by current browser
@@ -23,7 +23,7 @@ var DzFactory = function () {
 					}
 				});
 				this.on('complete', function(file) {
-					var dz = this;
+					const dz = this;
 					// Remove just uploaded file from dropzone, makes interface more clear.
 					// Image can be seen in posting-preview
 					// We need preview to get optical feedback about upload-progress.
@@ -55,8 +55,8 @@ var DzFactory = function () {
 		})
 	};
 
-	this.setupDropzone = function(dropSelector, textareaSelector) {
-		var dropzone = this.createDropzone(dropSelector, textareaSelector);
+	this.setupDropzone = function(dropSelector, textareaElementId) {
+		var dropzone = this.createDropzone(dropSelector, textareaElementId);
 		$(dropSelector).on('paste', function(event) {
 			dzFactory.copyPaste(event, dropzone);
 		})
diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl
index 81664cf0fe..2d977d807c 100644
--- a/view/theme/frio/templates/comment_item.tpl
+++ b/view/theme/frio/templates/comment_item.tpl
@@ -68,12 +68,12 @@
 <script>
 	$('[id=comment-fake-text-{{$id}}]').on('focus', function() {
 		dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}'); 
-		$('[id=comment-fake-text-{{$id}}]').prop('focus', null).off('focus')
-		$('[id=comment-{{$id}}]').prop('click', null).off('click')
+		$('[id=comment-fake-text-{{$id}}]').prop('focus', null).off('focus');
+		$('[id=comment-{{$id}}]').prop('click', null).off('click');
 	});
 	$('[id=comment-{{$id}}]').on('click', function() {
 		dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}'); 
-		$('[id=comment-fake-text-{{$id}}]').prop('focus', null).off('focus')
-		$('[id=comment-{{$id}}]').prop('click', null).off('click')
+		$('[id=comment-fake-text-{{$id}}]').prop('focus', null).off('focus');
+		$('[id=comment-{{$id}}]').prop('click', null).off('click');
 	});
 </script>
-- 
2.39.5