Skip to content

Commit

Permalink
Do not load jquery.fileupload.js twice, fixes #5749
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet committed Sep 24, 2021
1 parent 4306c28 commit 92b2102
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ProductOpener/Images.pm
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,20 @@ sub display_search_image_form($) {
HTML
;

# Do not load jquery file upload twice, if it was loaded by another form

$scripts .= <<JS
if ($scripts !~ /jquery.fileupload.js/) {

$scripts .= <<JS
<script type="text/javascript" src="/js/dist/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="/js/dist/jquery.fileupload.js"></script>
<script type="text/javascript" src="/js/dist/load-image.all.min.js"></script>
<script type="text/javascript" src="/js/dist/canvas-to-blob.js"></script>
JS
;

}

$initjs .= <<JS
\/\/ start off canvas blocks for small screens
Expand Down

0 comments on commit 92b2102

Please sign in to comment.