Jump to:

7939 Posts in 1543 Topics by 946 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, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 884 Views
  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Getting javascript into the DOM popup Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Getting javascript into the DOM popup Link to this post

    I would just put your own DataObjectManager_popup.ss in your theme dir, and add a require tag..

    <% require javascript(some/js/file.js) %>

    884 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.