source: extensions/net.sf.basedb.reggie/trunk/resources/print_template.jsp @ 1849

Last change on this file since 1849 was 1849, checked in by Nicklas Nordborg, 7 years ago

References #462: Implement a print function that can print complete pages

Implemented a javascript function that opens a popup window and copies the content of a specified html tag (given by the id) to the popup window.

openPrintWindow(ID, printElementId, pageTitle, pageOrientation, printNote)

The change also includes printing changes made in separate branch for #425 in [1723].

File size: 1.5 KB
Line 
1<%@ page
2  pageEncoding="UTF-8"
3  session="false"
4  import="net.sf.basedb.core.User"
5  import="net.sf.basedb.core.DbControl"
6  import="net.sf.basedb.core.SessionControl"
7  import="net.sf.basedb.core.Application"
8  import="net.sf.basedb.util.Values"
9  import="net.sf.basedb.util.extensions.Extension"
10  import="net.sf.basedb.clients.web.Base" 
11  import="net.sf.basedb.clients.web.util.HTML"
12  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
13  import="java.util.List"
14  import="java.util.ArrayList"
15%>
16<%
17final SessionControl sc = Base.getExistingSessionControl(request, true);
18final String ID = sc.getId();
19%>
20<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
21<html>
22<head>
23  <title>Print template</title>
24  <link rel="SHORTCUT ICON" href="images/print.png">
25  <link rel="stylesheet" type="text/css" href="css/reggie.css">
26  <link rel="stylesheet" type="text/css" href="css/printable.css">
27  <script>
28  function init()
29  {
30    window.opener.<%=request.getParameter("callback")%>();
31  }
32  </script>
33</head>
34<body onload="init()">
35  <div class="paper" id="paper">
36    <div class="noprint fullwidth" style="border-bottom: 1px dashed #A0A0A0; padding: 0 1em 1em 1em;">
37      <span class="button" onclick="window.print()" style="float: left; margin-right: 1em;">
38        <img src="images/print.png">Print&hellip;
39      </span>
40      <span id="printNote"></span>
41      <br clear="all">
42    </div>
43    <div id="printarea" style="text-align: center;"></div>
44  </div>
45</body>
46</html>
Note: See TracBrowser for help on using the repository browser.