docpublist.jsp
来自「Java的框架」· JSP 代码 · 共 101 行
JSP
101 行
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="/WEB-INF/tld/doc-man.tld" prefix="docman" %>
<c:url var="docPubUrl" value="/docPub" />
<c:url var="searchUrl" value="/searchDoc.action">
<c:param name="method" value="search"/>
<c:param name="from" value="list"/>
<c:param name="searchPub" value="versionPublished"/>
</c:url>
<html>
<head>
<title><fmt:message key="docPub.title"/></title>
<content tag="heading">
<fmt:message key="docPub.heading"/>
</content>
<script type="text/javascript" src="<c:url value='/scripts/selectbox.js'/>"></script>
</head>
<script LANGUAGE="JavaScript">
var winOpen
function openDest(){
//get selected target
var destpath = docman_getSelected();
if (!docman_hasSelection () || docman_getSelectedType() != 'File') {
alert ("Please select a file to view.");
return false;
}
winOpen = window.open("<c:out value="${docPubUrl}"/>/"+destpath, "winOpen", "resizable=yes, scrollbars=yes, menubar=yes, location=yes, toolbar=yes, width=700, height=500");
winOpen.focus();
}
function highlightOpen(){
var destpath;
var pubstring = "/docPub/";
if (winOpen != null && !winOpen.closed) {
destpath= new String (winOpen.location);
var index = destpath.indexOf (pubstring);
if (index != -1)
destpath = destpath.substring (index + pubstring.length);
if (destpath != null && destpath != '') {
docman_highlightFile (destpath);
}
}
else
alert ("Publication Window is not opened.");
}
<c:if test="${!empty docMainPagePath}">
winOpen = window.open("<c:out value="${docPubUrl}"/>/<c:out value="${docMainPagePath}"/>", "winOpen", "resizable=yes, scrollbars=yes, menubar=yes, location=yes, toolbar=yes, width=700, height=500");
</c:if>
</script>
<body>
<span id="message"><c:out value="${message}"/></span>
<div class="separator"></div>
<c:set var="pageButtons">
<button name="open" type="button" style="margin-right: 5px"
onclick="javascript:openDest();">
<fmt:message key="button.docPub.openDest"/>
</button>
<button name="highlightfile" type="button" style="margin-right: 5px"
onclick="javascript:highlightOpen();">
<fmt:message key="button.docPub.highlightOpen"/>
</button>
<button type="button" style="margin-right: 5px" onclick="window.location='<c:out value="${searchUrl}"/>'">
<fmt:message key="button.search"/>
</button>
<button type="button" onclick="window.location='<c:url value="/mainPage.action" />'">
<fmt:message key="button.cancel"/>
</button>
</c:set>
<c:out value="${pageButtons}" escapeXml="false" />
<table class="detail">
<tr>
<td> </td>
</tr>
<tr>
<td valign="top">Main Page:</td>
<td> </td>
<td>
<c:if test="${empty docMainPagePath}">
No Main Page Set.
</c:if>
<c:if test="${!empty docMainPagePath}">
<c:out value="${docPubUrl}"/>/<c:out value="${docMainPagePath}"/>
</c:if>
</td>
</tr>
<tr>
<td valign="top">Published Files:</td>
<td> </td>
<td>
<docman:buildDocStructView folder="${docManFolderStruct}" expandAll="true" showFile="true" />
</td>
</tr>
</table>
<c:out value="${pageButtons}" escapeXml="false" />
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?