7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Getting javascript into the DOM popup
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 761 Views |
-
Getting javascript into the DOM popup

1 April 2010 at 8:20am
Hi Uncle Cheese!
Is there a way to get my own javascript into the DOM popup?
I've created a data object that uses Google maps in its form and right now I'm injecting my custom javascript through the literal field. That's almost too nasty for words but I tried putting Requirements in the beginning of getCMSFields but the scripts I tried to require that way did not show up in the popup.Is there some other better way of doing this or am I stuck with my nasty solution?
I've thought about making a field like Rossiter has done in his module but I'd really like to store latitude, longitude and the google address in separate fields and don't really know the best way of approaching making a field that really is several fields.
-
Re: Getting javascript into the DOM popup

1 April 2010 at 8:41am
I would just put your own DataObjectManager_popup.ss in your theme dir, and add a require tag..
<% require javascript(some/js/file.js) %>
| 761 Views | ||
|
Page:
1
|
Go to Top |

