📄 documentlist.jsp
字号:
<jsp:include page="/include/global.jsp"/>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page contentType="text/html; charset=GBK" %>
<HTML>
<HEAD>
<style>
A:link {text-decoration: underline; color:red}
A:visited { color:red; text-decoration:underline }
A:active { text-decoration: underline; color:red }
A:hover {text-decoration:underline;color:red;background-color:#cccccc;}
</style>
<meta http-equiv="Pragma" content="no-cache">
<base target="_self">
<LINK rel=stylesheet type=text/css HREF="../../common/olstyle.css">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=gb2312">
<script type="text/javascript" src="../../common/CTable.js"></script>
<script type="text/javascript" src="../../common/CommonFunc.js"></script>
<SCRIPT language=javascript id=clientEventHandlersJS>
window.onload = ShowTable;
var mTable = null ;
var mTableData = new CTableItem(null,null,null,null,null,null,'T');//按照缺省的属性建立一个Table
var ShowingModal=false; //used for show modal window
var myObject = new Object(); //used for arg
var i;
cntCTDefaultRowCellDefine = "";// 表格内容可以wrap
//状态用图标表示
mTableData.head.addCells(new Array("文件名","版本","大小","日期-时间","用户","状态","提示","Username"));
//设置排序的列
mTableData.SetHeadCell( 0 ,"cansort", true);
mTableData.SetHeadCell( 3 ,"cansort", true);
mTableData.SetHeadCell( 4 ,"cansort", true);
mTableData.SetHeadCell( 7 ,"showit", false);
//设置各列的属性
mTableData.SetHeadCell( 0 ,"define" , ' width=40% height="22" class="bluelinkText" title="按文件名称排序"');
mTableData.SetHeadCell( 1 ,"define" , ' width=30 height="22" nowrap align=center');
mTableData.SetHeadCell( 2 ,"define" , ' width=50 height="22" nowrap align=right');
mTableData.SetHeadCell( 3 ,"define" , ' width=110 height="22" nowrap align=center class="bluelinkText" title="按日期时间排序"');
mTableData.SetHeadCell( 4 ,"define" , ' width=60 height="22" nowrap class="bluelinkText" title="按用户排序"');
mTableData.SetHeadCell( 5 ,"define" , ' width=40 height="22" nowrap align=center ');
mTableData.SetHeadCell( 6 ,"define" , ' width=40% height="22" ');
mTableData.SetHeadCell( 7 ,"define" , ' ');
//将RecordSet里面的数据放入表格
var lindex
function btnChg_onclick() {
alert("修改选中的目录或文件属性");
}
function btnDel_onclick() {
alert("删除选中的目录或文件,要先确认");
}
function btnRead_onclick() {
if(mTable.CurSelectRow == null){
alert("请先选择目标文件");
return;
}
}
function btnDownload_onclick() {
alert("下载选中的文件");
}
function btnCheckout_onclick() {
if(mTable.CurSelectRow == null){
alert("请先选择目标文件");
return;
}
location = "checkout.htm";
}
function btnCheckin_onclick() {
if(mTable.CurSelectRow == null){
alert("请先选择目标文件");
return;
}
location = "checkin.htm";
}
function btnHistory_onclick() {
if(mTable.CurSelectRow == null){
alert("请先选择目标文件");
return;
}
var myObject = new Object(); //used for arg
window.showModalDialog("history.htm",myObject,"dialogWidth:700px;dialogHeight:450px;status:no;scroll:yes;help:no")
}
function ShowTable() { //显示表
if(mTable == null){
mTable =new CommonTableClass(divMain,mTableData);
mTable.ReDraw();
}
}
function divMainOnClick(aTable)
{
if (aTable) aTable.OnClick();
}
function divMainOnClickCell(axx)
{
divMainOnClickRow(axx);
}
function divMainOnClickRow(axx)
{
parent.leftFrame.gTree.SelectNode2(parent.leftFrame.gTree.mSelected);
parent.tbFrame.onClickRow(mTable.CurSelectRow.others);
}
</SCRIPT>
<logic:iterate name="resultList" id="entity" type="com.chinaspis.future.dao.Document">
<script language="JavaScript">
lindex =
mTableData.AddRow(new Array("<a target='_blank' href='<%=request.getContextPath()%>/servlet/attachments/download/00-<%=entity.getLatestAttachment().getObjectType()%>-<%=entity.getLatestAttachment().getObjectId()%>-<%=entity.getLatestAttachment().getId()%>/<%=entity.getLatestAttachment().getFileName()%>' title='浏览或下载文件'><bean:write name='entity' property='name' /></a>",
"<bean:write name='entity' property='version' />","<%int s=(int)entity.getSize()/1024;if (entity.getSize()%1024>0) s++;out.print(s);%> KB",
"<bean:write name='entity' property='updateDate' format='yyyy-MM-dd hh:mm'/>",
"<bean:write name='entity' property='operator' />",
"<logic:equal name='entity' property='status' value="2"><img src='../../images/cm-lock.gif' ></logic:equal><logic:equal name='entity' property='status' value="3"><img src='../../images/cm-checkout.gif' ></logic:equal>",
"<bean:write name='entity' property='remark' />","<bean:write name='entity' property='operator.username' />")
,null
,null
,"<bean:write name='entity' property='status' />"
,null
,"<bean:write name='entity' property='id'/>"
,null
);
mTableData.SetCell(lindex,1,"define"," align=center ");
mTableData.SetCell(lindex,2,"define"," align=right ");
mTableData.SetCell(lindex,3,"define"," align=center ");
mTableData.SetCell(lindex,5,"define"," align=center ");
</script>
</logic:iterate>
<script language="JavaScript">
<!--
function download(loc) {
document.write("<IFRAME name=\"content\" style=\"visibility: hidden;\" src=\""+loc+"\"></IFRAME>");
content.document.execCommand("saveAs");
}
//-->
</script>
</head>
<body >
<div id="divMain" style="behavior:url(../../common/CTable.htc)"
onclick = "divMainOnClick(mTable);"
onclickCell = "divMainOnClickCell(divMain);"
onclickRow = "divMainOnClickRow(divMain);"
onSort = ""
onclickCol = ""
> </DIV>
</body>
<A target=""></A>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -