Commit 1ea2dfa5 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Do not add the same icon multiple times to dropzones

Some DOM queries were to broad which caused paperclip icons and spinners
to be added multiple times to a dropzone in case of multiple dropzones
on a page.
parent 52681358
......@@ -25,10 +25,10 @@ class @DropzoneInput
form_dropzone = $(form).find('.div-dropzone')
form_dropzone.parent().addClass "div-dropzone-wrapper"
form_dropzone.append divHover
$(".div-dropzone-hover").append iconPaperclip
form_dropzone.find(".div-dropzone-hover").append iconPaperclip
form_dropzone.append divSpinner
$(".div-dropzone-spinner").append iconSpinner
$(".div-dropzone-spinner").css
form_dropzone.find(".div-dropzone-spinner").append iconSpinner
form_dropzone.find(".div-dropzone-spinner").css
"opacity": 0
"display": "none"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment