ollietb / OhGoogleMapFormTypeBundle

Set latitude and longitude values on a form using Google Maps
MIT License
30 stars 76 forks source link

optionally load javascripts using LcnIncludeAssetsBundle #27

Open jfmaeck opened 9 years ago

jfmaeck commented 9 years ago

Hi @ollietb,

thank your for providing this useful plugin.

From your Readme:

Because the form type template includes javascript, there's not yet a way to bunch it all together at the very bottom of the page, so it is included at the bottom of the field. This means that jquery and the javascript plugin in Resources/public/js needs to be included before the field. I'm not sure of a way around this, but I think it's going to be addressed in a later version of the form framework.

To overcome this limitation in Symfony 2 we at Faibl Locaine.com built the LcnIncludeAssetsBundle. I created this small pull request to optionally enable automatic script loading in projects using the LcnIncludeAssets bundle.

If you like it, feel free to include the changes in your plugin.

Cheers!

Jonas

nicodemuz commented 9 years ago

+1