Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JS loading in autocomplete form type #4610

Merged
merged 1 commit into from
Aug 18, 2017
Merged

Fix JS loading in autocomplete form type #4610

merged 1 commit into from
Aug 18, 2017

Conversation

juchi
Copy link
Contributor

@juchi juchi commented Aug 18, 2017

I am targeting this branch, because this change is backward compatible.

Changelog

### Changed
- Run the Select2 code for autocomplete form type at onload event

Subject

The autocomplete model form type uses Select2 to render the dropdown. However the code runs before the onload JS event, which is not compatible with loading the JS files at the end of the page.
This changes allows one to change the standard_layout template and move the JavaScript files (except jQuery) to the end of the HTML page.

Trigger the select2-JavaScript code at onload event
@greg0ire greg0ire added the minor label Aug 18, 2017
@greg0ire
Copy link
Contributor

@greg0ire greg0ire added patch and removed patch labels Aug 18, 2017
@greg0ire greg0ire merged commit b2b39d5 into sonata-project:3.x Aug 18, 2017
@greg0ire
Copy link
Contributor

Thanks @juchi !

pestaa pushed a commit to Crosssec/SonataAdminBundle that referenced this pull request Aug 31, 2017
Trigger the select2-JavaScript code at onload event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants