]> git.mxchange.org Git - friendica.git/commitdiff
changes in case of code-review
authorJakobus Schürz <jakobus.schuerz@schuerz.at>
Fri, 17 Mar 2023 09:49:12 +0000 (10:49 +0100)
committerJakobus Schürz <jakobus.schuerz@schuerz.at>
Sun, 19 Mar 2023 17:52:46 +0000 (18:52 +0100)
src/Content/Conversation.php
view/js/dropzone-factory.js
view/theme/frio/templates/comment_item.tpl

index f23333911b7ddc60edcc4d50f95412bf1e65969f..249190b1add67c4630aebf2aad6551cd2b5218ff 100644 (file)
@@ -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),
-
                ]);
 
 
index a3a3e6c3628e6c3861cdc60c1d50a1979f63c04c..21ea5ebbc2c176f963f57284b58be6986aea3a31 100644 (file)
@@ -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);
                })
index 81664cf0fee681919292dcab2c3c531b59d79ce6..2d977d807c28f1fbd97fa5a6f1e01acea53da736 100644 (file)
 <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>