⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dodownload.jsp

📁 找了很久才找到到源代码
💻 JSP
字号:
<%@ page import="org.opencms.main.*,org.opencms.util.*,java.io.*"%>
<%
// cannot use new_admin style, link class shifts vertical-align from baseline (firefox looks awful).
%>
<html>
<head>
<title>%=messages.key(org.opencms.workplace.tools.workplace.rfsfile.Messages.GUI_WORLKPLACE_LOGVIEW_DODOWNLOAD_HEADER_1,file.getName())%></title>
<style type="text/css">
body, table {
  font-size: 11px;
  font-family: Verdana, Arial, Helvetica, sans-serif;   
}

.link,
.link a {
  display: inline;
  background: none;
  background-color: transparent;
  vertical-align: baseline;
  cursor: hand;
  cursor: pointer;
  color: WindowText;
  text-decoration: none;
}

.link:hover a,
.link a:hover {
  text-decoration: underline;
  color: #000088;
}

.link:hover img,
.link img:hover { 
  text-decoration: none;
}
</style>
<%
            CmsRfsFileViewer viewer = OpenCms.getWorkplaceManager().getFileViewSettings();
            org.opencms.i18n.CmsMessages messages = org.opencms.workplace.tools.workplace.rfsfile.Messages.get().getBundle();
            String filePath = viewer.getFilePath();

            if (CmsStringUtil.isEmpty(filePath)) {
                throw new ServletException(
                    messages.key(org.opencms.workplace.tools.workplace.rfsfile.Messages.ERR_DOWNLOAD_SERVLET_FILE_ARG_0));
            }
            File file = new File(filePath);
%>
<script type="text/javascript">
function download(){
  window.location.href = "<%= request.getParameter("servletUrl")%>?filePath=<%=file.getAbsolutePath().replace('\\', '/') %>"
}

window.setTimeout("download()",500);
</script>
</head>
<body>
<p>
<table style="margin:6px;padding:4px;text-align:left;">
	<tr>
		<td colspan="2"><b> <%=messages.key(
                    org.opencms.workplace.tools.workplace.rfsfile.Messages.GUI_WORLKPLACE_LOGVIEW_DODOWNLOAD_HEADER_1,
                    file.getName())%> </b></td>
	</tr>
	<tr>
		<td colspan="2"><%=messages.key(org.opencms.workplace.tools.workplace.rfsfile.Messages.GUI_WORLKPLACE_LOGVIEW_DODOWNLOAD_MESSAGE_0)%>
		<span class="link"><a href="javascript:download()"
			onClick="javascript:download"><%=messages.key(org.opencms.workplace.tools.workplace.rfsfile.Messages.GUI_WORLKPLACE_LOGVIEW_DODOWNLOAD_LINKTXT_0)%></a></span>.
		</td>
	</tr>
	<tr id="spacer">
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2" style="text-align:center;"><input type="button"
			value="Close" onClick="javascript:window.close()" /></td>
	</tr>
</table>
</p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -