]> git.mxchange.org Git - friendica.git/commitdiff
add dropzone also onclick on comment-fake-form
authorJakobus Schürz <jakobus.schuerz@schuerz.at>
Wed, 15 Mar 2023 14:19:55 +0000 (15:19 +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 5926e787ffa4415cb8821f8719a30c78c6d33b04..c0f78eda9d9c600a5fdf7e87258782add9c3d08b 100644 (file)
 
 <script>
        Dropzone.autoDiscover = false;
+       $('[id=comment-fake-text-{{$id}}]').on('focus', function() {
+               dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}}); 
+               $('[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}}'), {{$max_imagesize}}); 
-               $('[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>