Jump to:

5516 Posts in 1734 Topics by 1221 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Loading JS-Requirements to ModelAdmin-DOM-Popup

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 421 Views
  • Lukin
    Avatar
    Community Member
    42 Posts

    Loading JS-Requirements to ModelAdmin-DOM-Popup Link to this post

    HI,

    I need some js behaviour in the PopUp-View of a DataOject.
    Scenario:

    ModelAdmin
    + manages Kategorien
    + Has ManyMany Typs
    The Typ-Objects are listed in a DOM-Element
    When clicking on an entry of the DOM / or pushing the Add-Button I get the PopUp to Edit or Create my Typ-Object.

    I want to Add a javascript Behaviour to that view. I tried to add the js to the popup-view like this:

    I put Requirements::javascript("Typ.js");
    into the getMCSFields_forPupup function.

    The js is now loading. (i put an alert into the jsfile to check), but the behaviour does not seem to be applied to the html-dom-element.
    Might be cause the popup view is an iframe or something??

    So... Question:

    <b>How to put extra-behaviour to the popup-view defined by getcmsfields_forpopup?</b>

    Thaks in advance

    cheers Lukin

    421 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.