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.
This commit is contained in:
parent
526813581b
commit
1ea2dfa5de
1 changed files with 3 additions and 3 deletions
|
@ -25,10 +25,10 @@ class @DropzoneInput
|
||||||
form_dropzone = $(form).find('.div-dropzone')
|
form_dropzone = $(form).find('.div-dropzone')
|
||||||
form_dropzone.parent().addClass "div-dropzone-wrapper"
|
form_dropzone.parent().addClass "div-dropzone-wrapper"
|
||||||
form_dropzone.append divHover
|
form_dropzone.append divHover
|
||||||
$(".div-dropzone-hover").append iconPaperclip
|
form_dropzone.find(".div-dropzone-hover").append iconPaperclip
|
||||||
form_dropzone.append divSpinner
|
form_dropzone.append divSpinner
|
||||||
$(".div-dropzone-spinner").append iconSpinner
|
form_dropzone.find(".div-dropzone-spinner").append iconSpinner
|
||||||
$(".div-dropzone-spinner").css
|
form_dropzone.find(".div-dropzone-spinner").css
|
||||||
"opacity": 0
|
"opacity": 0
|
||||||
"display": "none"
|
"display": "none"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue