ソースを参照

Updated the org chart so it will show properly when printed (without the header and footer, etc.).

jalbr74 6 年 前
コミット
5dfc1ed833

+ 1 - 0
webapp/src/main/webapp/WEB-INF/jsp/fragment/header.jsp

@@ -50,6 +50,7 @@
     <link rel="icon" type="image/png" href="<pwm:url url='/public/resources/favicon.png' addContext="true"/>"/>
     <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/pwm-icons.css' addContext="true"/>"/>
     <link href="<pwm:url url='/public/resources/style.css' addContext="true"/>" rel="stylesheet" type="text/css" media="screen"/>
+    <link href="<pwm:url url='/public/resources/style-print.css' addContext="true"/>" rel="stylesheet" type="text/css" media="print"/>
     <link href="<pwm:url url="%THEME_URL%"/>" rel="stylesheet" type="text/css" media="screen"/>
     <pwm:if test="<%=PwmIfTest.requestFlag%>" requestFlag="<%=PwmRequestFlag.NO_MOBILE_CSS%>" negate="true">
         <link media="only screen and (max-width: 600px)" href="<pwm:url url='/public/resources/mobileStyle.css' addContext="true"/>" type="text/css" rel="stylesheet"/><%-- iphone css --%>

+ 1 - 1
webapp/src/main/webapp/WEB-INF/jsp/peoplesearch.jsp

@@ -26,7 +26,7 @@
 <%@ taglib uri="pwm" prefix="pwm" %>
 <html lang="<pwm:value name="<%=PwmValue.localeCode%>"/>" dir="<pwm:value name="<%=PwmValue.localeDir%>"/>">
 <%@ include file="/WEB-INF/jsp/fragment/header.jsp" %>
-<body class="nihilo">
+<body class="nihilo printable">
 <div id="wrapper" class="peoplesearch-wrapper">
     <jsp:include page="/WEB-INF/jsp/fragment/header-body.jsp">
         <jsp:param name="pwm.PageName" value="Title_PeopleSearch"/>

+ 17 - 0
webapp/src/main/webapp/public/resources/style-print.css

@@ -0,0 +1,17 @@
+/* Hide header and footer when printing */
+body.printable #header,
+body.printable #header-warning,
+body.printable-page #header-warning-backdrop,
+body.printable .ias-header,
+body.printable #footer
+{
+    display: none;
+}
+
+body.printable {
+    /* This tells Chrome and Safari to print background images and colors (even when the browser setting is turned off) */
+    -webkit-print-color-adjust: exact;
+
+    /* This tells Firefox to print background images and colors (even when the browser setting is turned off) */
+    color-adjust: exact;
+}