Skip to content
Snippets Groups Projects
Commit cbe4cfb7 authored by srosse's avatar srosse
Browse files

OO-2653 : make the css delegate transient (it hold the window which can lead...

OO-2653	: make the css delegate transient (it hold the window which can lead to serialize the whole memory through tomcat binding)
parent cfa3a6e7
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -76,7 +76,7 @@ public class IFrameDeliveryMapper implements Mapper {
private String frameId; private String frameId;
private String customCssURL; private String customCssURL;
private CustomCSSDelegate customCssDelegate; private transient CustomCSSDelegate customCssDelegate;
private String themeBaseUri; private String themeBaseUri;
private String customHeaderContent; private String customHeaderContent;
...@@ -174,6 +174,9 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -174,6 +174,9 @@ public class IFrameDeliveryMapper implements Mapper {
public void setCustomCssDelegate(CustomCSSDelegate customCssDelegate) { public void setCustomCssDelegate(CustomCSSDelegate customCssDelegate) {
this.customCssDelegate = customCssDelegate; this.customCssDelegate = customCssDelegate;
if(customCssDelegate.getCustomCSS() != null) {
customCssURL = customCssDelegate.getCustomCSS().getCSSURLIFrame();
}
} }
@Override @Override
...@@ -328,14 +331,14 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -328,14 +331,14 @@ public class IFrameDeliveryMapper implements Mapper {
//add olat content css as used in html editor //add olat content css as used in html editor
sb.appendOpenolatCss();//css only loaded once in HtmlOutput sb.appendOpenolatCss();//css only loaded once in HtmlOutput
} }
if (customCssURL != null) { if(customCssDelegate != null && customCssDelegate.getCustomCSS() != null
// add the custom CSS, e.g. the course css that overrides the standard content css
sb.appendCss(customCssURL, "customcss");
} else if(customCssDelegate != null && customCssDelegate.getCustomCSS() != null
&& customCssDelegate.getCustomCSS().getCSSURLIFrame() != null) { && customCssDelegate.getCustomCSS().getCSSURLIFrame() != null) {
String customCssURL = customCssDelegate.getCustomCSS().getCSSURLIFrame(); String customCssURL = customCssDelegate.getCustomCSS().getCSSURLIFrame();
sb.appendCss(customCssURL, "customcss"); sb.appendCss(customCssURL, "customcss");
} } else if (customCssURL != null) {
// add the custom CSS, e.g. the course css that overrides the standard content css
sb.appendCss(customCssURL, "customcss");
}
} }
if (enableTextmarking) { if (enableTextmarking) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment