Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Loading JS-Requirements to ModelAdmin-DOM-Popup


Reply


477 Views

Avatar
Lukin

Community Member, 42 Posts

8 November 2011 at 12:33am

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