Jako / AjaxUpload

Snippet/jQuery Wrapper for Andrew Valums file upload in MODX Revolution
https://jako.github.io/AjaxUpload/
GNU General Public License v2.0
10 stars 18 forks source link

Nu buttons rendering in modal window #11

Closed HarveyEV closed 8 years ago

HarveyEV commented 8 years ago

I have a bootstrap modal into which I load a resource with a formit form containing the ajaxupload snippet. However none of the buttons render in the form. When I use a plain resource not loaded in a modal the buttons render fine.

My snippet call is : [[!AjaxUpload? &uid=image &allowedExtensions=jpg,jpeg,png,gif &thumbX=75 &thumbY=75 &maxFiles=1 ]]

HarveyEV commented 8 years ago

All that renders is the noscript button which is not visible obviously: <noscript><input type="file" name="image"/></noscript>

HarveyEV commented 8 years ago

yeah. Github strips backticks. The snippet call posted above is correct.

HarveyEV commented 8 years ago

It appears the js is not being appended to the body when called in a modal window.

Jako commented 8 years ago

It is a bit difficult to answer on this, since I don't know how you create the modal: You have to load the assets/components/ajaxupload/js/web/ajaxupload.min.js script on the page that displays the modal. And you have to make sure that the AjaxUpload config script is executed in the modal.

HarveyEV commented 8 years ago

Yeah I manually loaded the css and js and the buttons are rendering now. Next for the Formit hooks... Thx.