]> git.mxchange.org Git - friendica.git/commitdiff
attach dropzone only when opening comment
authorJakobus Schürz <jakobus.schuerz@schuerz.at>
Wed, 15 Mar 2023 04:52:41 +0000 (05:52 +0100)
committerJakobus Schürz <jakobus.schuerz@schuerz.at>
Sun, 19 Mar 2023 17:52:45 +0000 (18:52 +0100)
view/theme/frio/templates/comment_item.tpl

index c4fcb9f6279b16f13f43890958c429ac361099eb..5926e787ffa4415cb8821f8719a30c78c6d33b04 100644 (file)
@@ -67,5 +67,8 @@
 
 <script>
        Dropzone.autoDiscover = false;
-       dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}}); 
+       $('[id=comment-{{$id}}]').on('click', function() {
+               dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}}); 
+               $('[id=comment-{{$id}}]').prop('click', null).off('click')
+       });
 </script>