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

OO-3155: remove support for IE9 and the bless process to split CSS files

parent 2d040df7
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,6 @@ public class CalendarPrintMapper implements Mapper { ...@@ -95,7 +95,6 @@ public class CalendarPrintMapper implements Mapper {
.append("</title>") .append("</title>")
.append("<meta http-equiv='Content-type' content='text/html; charset=utf-8' />") .append("<meta http-equiv='Content-type' content='text/html; charset=utf-8' />")
.append("<link href='").append(themeBaseUri).append("theme.css' rel='stylesheet' type='text/css' />\n") .append("<link href='").append(themeBaseUri).append("theme.css' rel='stylesheet' type='text/css' />\n")
.append("<!--[if IE 9]><link id='o_theme_css_ie' href='").append(themeBaseUri).append("theme_ie_completions.css' rel='stylesheet' type='text/css' /><![endif]-->\n")
.append("</head><body class='o_cal_print' onload='window.focus();window.print()'>"); .append("</head><body class='o_cal_print' onload='window.focus();window.print()'>");
//collect all events //collect all events
......
...@@ -348,7 +348,7 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -348,7 +348,7 @@ public class IFrameDeliveryMapper implements Mapper {
sb.append("\n<script type=\"text/javascript\">\n/* <![CDATA[ */\n"); sb.append("\n<script type=\"text/javascript\">\n/* <![CDATA[ */\n");
// Set the iframe id. Important to set before iframe.js is loaded. // Set the iframe id. Important to set before iframe.js is loaded.
sb.append("b_iframeid=\"").append(frameId).append("\";"); sb.append("b_iframeid=\"").append(frameId).append("\";");
sb.append("b_isInlineUri=").append(Boolean.valueOf(addCheckForInlineEvents).toString()).append(";"); sb.append("b_isInlineUri=").append(Boolean.toString(addCheckForInlineEvents)).append(";");
sb.append("\n/* ]]> */\n</script>"); sb.append("\n/* ]]> */\n</script>");
sb.appendStaticJs("js/openolat/iframe.js"); sb.appendStaticJs("js/openolat/iframe.js");
sb.appendStaticJs("js/iframeResizer/iframeResizer.contentWindow.min.js"); sb.appendStaticJs("js/iframeResizer/iframeResizer.contentWindow.min.js");
......
...@@ -37,7 +37,6 @@ import org.olat.core.util.WebappHelper; ...@@ -37,7 +37,6 @@ import org.olat.core.util.WebappHelper;
*/ */
public class Theme { public class Theme {
public static final String DEFAULTTHEME = "light"; public static final String DEFAULTTHEME = "light";
private static final String IE_COMPLETION_FILENAME = "theme_ie_completions.css";
private static final String CUSTOM_JS_FILENAME = "theme.js"; private static final String CUSTOM_JS_FILENAME = "theme.js";
private static final String CUSTOM_FAVICON_ICO_FILENAME = "favicon.ico"; // legacy private static final String CUSTOM_FAVICON_ICO_FILENAME = "favicon.ico"; // legacy
private static final String CUSTOM_FAVICON_PNG16_FILENAME = "meta/favicon16.png"; private static final String CUSTOM_FAVICON_PNG16_FILENAME = "meta/favicon16.png";
...@@ -128,7 +127,7 @@ public class Theme { ...@@ -128,7 +127,7 @@ public class Theme {
* @return * @return
*/ */
private String buildHTMLHeaderElements() { private String buildHTMLHeaderElements() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder(512);
// 1) lookup theme in release files // 1) lookup theme in release files
String staticThemesPath = WebappHelper.getContextRealPath("/static/themes/"); String staticThemesPath = WebappHelper.getContextRealPath("/static/themes/");
if(staticThemesPath == null) { if(staticThemesPath == null) {
...@@ -142,12 +141,6 @@ public class Theme { ...@@ -142,12 +141,6 @@ public class Theme {
} }
// Include the theme css file // Include the theme css file
sb.append("<link id='o_theme_css' href='").append(baseURI).append("theme.css' rel='stylesheet' type='text/css' />\n"); sb.append("<link id='o_theme_css' href='").append(baseURI).append("theme.css' rel='stylesheet' type='text/css' />\n");
// additionally add the blessed IE css if available
if (new File(themeFolder,IE_COMPLETION_FILENAME).exists()) {
sb.append("<!--[if IE 9]>\n");
sb.append("<link id='o_theme_css' href='").append(baseURI).append(IE_COMPLETION_FILENAME).append("' rel='stylesheet' type='text/css' />\n");
sb.append("<![endif]-->\n");
}
// Include custom theme javascript file, for login caroussel, js-based layout patches etc // Include custom theme javascript file, for login caroussel, js-based layout patches etc
if (new File(themeFolder,CUSTOM_JS_FILENAME).exists()) { if (new File(themeFolder,CUSTOM_JS_FILENAME).exists()) {
sb.append("<script type='text/javascript' src='").append(baseURI).append(CUSTOM_JS_FILENAME).append("'></script>\n"); sb.append("<script type='text/javascript' src='").append(baseURI).append(CUSTOM_JS_FILENAME).append("'></script>\n");
......
...@@ -37,13 +37,6 @@ searchThemes () { ...@@ -37,13 +37,6 @@ searchThemes () {
fi fi
} }
# Helper method to split files with too many selectors for ie <= 9
ie9ify () {
css="$TARGET/theme.css"
[ -e $css ] && { printf "ie9ify $TARGET:\n "; blessc --no-imports $css "$TARGET/theme_ie_completions.css"; rm -f "$TARGET/theme_ie_completions-blessed1.css"; }
echo " done"
}
# Helper method to compile the theme # Helper method to compile the theme
doCompile () { doCompile () {
TARGET=$1 TARGET=$1
...@@ -57,7 +50,6 @@ doCompile () { ...@@ -57,7 +50,6 @@ doCompile () {
sass --version sass --version
sass --style $STYLE --no-cache $UPDATE $TARGET:$TARGET --load-path light light/modules sass --style $STYLE --no-cache $UPDATE $TARGET:$TARGET --load-path light light/modules
echo "sass --style $STYLE $UPDATE $TARGET:$TARGET --load-path light light/modules" echo "sass --style $STYLE $UPDATE $TARGET:$TARGET --load-path light light/modules"
[ $bless -eq 0 ] && ie9ify $TARGET
echo "done" echo "done"
} }
...@@ -89,11 +81,6 @@ THEMES=$1 ...@@ -89,11 +81,6 @@ THEMES=$1
# handle ctrl-c # handle ctrl-c
trap control_c SIGINT trap control_c SIGINT
# check for blessc command needed for ie9 optimizations
command -v blessc >/dev/null 2>&1
bless=$?
[ $bless -ne 0 ] && printf >&2 "\n\e[0;31mInstall blessc to optimize css for ie <= 9 (npm install -g bless)\e[0m\n\n"
# Add themes to compile from given path # Add themes to compile from given path
doCompile "."; doCompile ".";
searchThemes $THEMES; searchThemes $THEMES;
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
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