Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Natalie D
[SOLVED] Theme-specific JavaScripts in popups
21 mai 2012 23:39
Réponse

Natalie D

Rang: Junior Member

Publications: 55

Date d'inscription: 6 février 2012

Publications Récentes

Do somebody know, why theme-specific javascripts are not included inside Liferay's popups (iframe placed inside div) like one below
 1
 2<aui:script>
 3    Liferay.provide(
 4        window,
 5        'showMyPopup',
 6        function(url, title) {
 7            var instance = this;
 8
 9            Liferay.Util.openWindow({
10            // ......
11        ['liferay-util-window']
12    );
13</aui:script>


But for example, all theme's CSS files are visible inside <head> tag of the popup, opened this way...
What is going one here?
Natalie D
RE: Theme JS in popups
21 mai 2012 23:40
Réponse

Natalie D

Rang: Junior Member

Publications: 55

Date d'inscription: 6 février 2012

Publications Récentes

Source of the problem stay the same, but I've used workaround.

Inside popup I've included all my javascripts files on my own. For example:

1
2<script type="text/javascript"
3    src="/my-theme/js/all-my-js-functions.js">
4</script>


Hope it helps somebody.
Ondřej Životský
RE: Theme JS in popups
15 juillet 2013 06:02
Réponse

Ondřej Životský

Rang: Junior Member

Publications: 29

Date d'inscription: 11 mars 2011

Publications Récentes

Today I encountered the same problem and found a solution ....

The problem is that you are adding javascript to portal_normal.vm and not to portal_pop_up.vm
Add your dependencies to head in portal_pop_up.vm and everything will be OK.

I hope it will be useful for someone