📄 cataloglist.jsp
字号:
<?xml version="1.0" encoding="gb2312" ?><%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312"%>
<%@ page import="com.eline.wap.common.util.*"%>
<%@ page import="com.eline.wap.catalog.model.*"%>
<%@ taglib uri="/WEB-INF/tlds/eline-common.tld" prefix="common" %>
<%@ taglib uri="/WEB-INF/tlds/eline-catalog.tld" prefix="catalog" %>
<%
// Get page parameters
int catalogId = StringUtils.getInt(request.getParameter("catalogId"), 0);
boolean isActiveOnly = StringUtils.getBoolean(request.getParameter("active"), true);
// Init veriables required for current page.
String actionUrl = SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_LIST) + "?catalogId=" + catalogId;
if (!isActiveOnly)
actionUrl += "&active=0";
System.out.println("catalogList.jsp?catalogId=" + catalogId + "&active=" + isActiveOnly);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>产品目录列表</title>
<link href="../../style/default.css" type="text/css" rel="stylesheet" />
<link href="../jsp_client/flyoutmenu/flyoutmenu.css" type="text/css" rel="stylesheet" />
<style type="text/css">
form { MARGIN: 0px 0px 0px 0px }
</style>
<jsp:include page="../common/menuData_inc.jsp" flush="true"/>
<script language="javascript" src="../common/common.js"></script>
<script language="javascript" id="clientEventHandlersJS">
<!--
function buttonCreate_onclick() {
var url = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_CREATE)%>?parentId=<%=catalogId%>";
var returnValue = showDialog(url, 500, 500);
if (returnValue == "reload")
window.location.reload();
}
function buttonUpdate_onclick() {
var checkGroup = document.all["CheckGroup"];
if (checkGroup == null) {
window.alert("Required page element(s) missing.");
return false;
}
var count = checkGroup.length == null ? 1 : checkGroup.length;
var checkedCount = 0;
var itemId = -1;
if (count == 1) {
if (checkGroup.checked) {
itemId = checkGroup.value;
checkedCount ++;
}
} else {
for (var i = 0; i < count; i ++) {
if (checkGroup[i].checked) {
itemId = checkGroup[i].value;
checkedCount ++;
}
}
}
if (checkedCount != 1) {
window.alert("当前选中了" + checkedCount + "项,您只能选中一个项来进行修改...");
return false;
}
var url = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_UPDATE)%>?catalogId=" + itemId;
var returnValue = showDialog(url, 500, 500);
if (returnValue == "reload")
window.location.reload();
}
function buttonDelete_onclick() {
var checkGroup = document.all["CheckGroup"];
if (checkGroup == null) {
window.alert("Required page element(s) missing.");
return false;
}
var count = checkGroup.length == null ? 1 : checkGroup.length;
var checkedCount = 0;
var itemId = "";
if (count == 1) {
if (checkGroup.checked) {
itemId = checkGroup.value;
checkedCount ++;
}
} else {
for (var i = 0; i < count; i ++) {
if (checkGroup[i].checked) {
itemId += checkGroup[i].value + ";";
checkedCount ++;
}
}
}
if (checkedCount < 1) {
window.alert("您还没选中要删除的项");
return false;
}
var url = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_DELETE)%>?catalogId=" + escape(itemId);
var returnValue = showDialog(url, 500, 500);
if (returnValue == "reload")
window.location.reload();
return true;
}
function checkActiveOnly_onclick() {
var element = event.srcElement;
var currentUrl = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_LIST) + "?catalogId=" + catalogId%>";
if (!element.checked)
currentUrl += "&active=0";
window.location.href = currentUrl;
}
function formSearch_onsubmit() {
if (document.all["searchKey"].value.length < 1) {
window.alert("请输入您要搜索的关键字");
return false;
}
return true;
}
function buttonImport_onclick() {
var url = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_RESOURCE_IMPORT)%>?catalogId=<%=catalogId%>&type=<%=SingleItem.SINGLE_BOOK%>&lock=0";
var returnValue = showDialog(url, 610, 460);
if (returnValue == "reload")
window.location.reload();
}
function buttonSort_onclick() {
var url = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_RESOURCE_SORT)%>?catalogId=<%=catalogId%>";
var returnValue = showDialog(url, 406, 400);
if (returnValue == "reload")
window.location.reload();
}
function resourcePreview_onclick(id, type) {
var urls = new Array("<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_BOOK_PREVIEW)%>",
"<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_NEWS_PREVIEW)%>",
"<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_RING_PREVIEW)%>",
"<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_PICTURE_PREVIEW)%>",
"<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_J2ME_PREVIEW)%>",
"<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_ANIMATION_PREVIEW)%>");
showDialog(urls[type] + "?catalogId=" + id, 410, 440);
}
-->
</script>
</head><body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"><table cellpadding="0" width="100%" cellspacing="0">
<tr>
<td colspan="2"><jsp:include page="../common/banner_inc.jsp" flush="true"/></td>
<tr>
<td valign="top" style="width: 180px" bgcolor="#f0f0f0">
<jsp:include page="../common/menuBody_inc.jsp" flush="true"/>
</td>
<td valign="top">
<table cellspacing="1" width="100%" border="0">
<tr>
<td>目录导航: <a href="<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_LIST)%>?catalogId=0" class="linkMenuSink">根目录</a>
<catalog:catalogNavigateList catalogId="<%=StringUtils.toString(catalogId)%>">
<common:items>
>><a href="<catalog:catalogNavigateAttribute name="catalogUrl" />" class="linkMenuSink"><catalog:catalogNavigateAttribute name="displayTitle" /></a>
</common:items>
</catalog:catalogNavigateList>
</td>
<td align="right">
<form style="MARGIN: 0px 0px 0px 0px" name="formSearch" action="<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_SEARCH) %>" method="post" onsubmit="return formSearch_onsubmit()">
查找目录:<input name="searchKey" type="text" maxlength="50" style="width:180px;" />
<input type="submit" name="ButtonSearch" value="搜索" class="button2w" />
</form>
</td>
</tr>
<tr>
<td colspan="2">
<catalog:catalogList pageItems="15" parentId="<%=catalogId%>" activeOnly="<%=isActiveOnly%>">
<table width="100%" class="tableBorder" cellpadding="1" cellspacing="1">
<tr>
<td class="tableHeader" width="25"><input type="checkbox" disabled checked /></td>
<td class="tableHeader" nowrap>标题</td>
<td class="tableHeader" width="100">类别</td>
<td class="tableHeader" width="50">状态</td>
<td class="tableHeader" width="120">更新时间</td>
</tr>
<common:items>
<tr>
<td class="tableRow"><input type="checkbox" name="CheckGroup" value="<catalog:catalogAttribute name="id" />" /></td>
<td class="tableRow"><a title="进入下一级" href="<catalog:catalogAttribute name="catalogUrl" />"><catalog:catalogAttribute name="displayTitle" /></a></td>
<td class="tableRow"><catalog:catalogAttribute name="listAttributeStr" /></td>
<td class="tableRow"><catalog:catalogAttribute name="statusStr" /></td>
<td class="tableRow"><catalog:catalogAttribute name="lastUpdate" /></td>
</tr>
</common:items>
</table>
<span style="font-size: 1px"> <br />
</span>
<table width="100%" class="tableBorder" cellpadding="0" cellspacing="2">
<tr>
<td align="right">
<table cellspacing="0" cellpadding="0">
<tr>
<td noWrap align="right">
<span class="columnText"><common:summaryForm /></span></td>
<td><common:firstForm action="<%=actionUrl%>">
<input class="button2w" style="width: 50px;" type="submit" value="最前" />
</common:firstForm></td>
<td><common:prevForm action="<%=actionUrl%>">
<input class="button2w" style="width: 50px;" type="submit" value="前页" />
</common:prevForm></td>
<td><common:nextForm action="<%=actionUrl%>">
<input class="button2w" style="width: 50px;" type="submit" value="下页" />
</common:nextForm></td>
<td><common:lastForm action="<%=actionUrl%>">
<input class="button2w" style="width: 50px;" type="submit" value="最后" />
</common:lastForm></td>
</tr>
</table>
</td>
</tr>
</table>
</catalog:catalogList>
<span style="font-size: 3px"> <br />
</span>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><input type="button" name="ButtonCreate" value="新建" class="button2w" onclick="return buttonCreate_onclick()" /><input type="button" name="ButtonUpdate" value="编辑" class="button2w" onclick="return buttonUpdate_onclick()" /><input type="button"
name="ButtonDelete" value="删除" class="button2w" onclick="return buttonDelete_onclick()" />
<input type="button" name="ButtonImport" value="导入资源" class="button4w" onclick="return buttonImport_onclick()" /><input type="button" name="ButtonSort" value="排序" class="button2w" onclick="return buttonSort_onclick()" />
</td>
<td align="right"><input type="checkbox" name="CheckActiveOnly" id="CheckActiveOnly" <%=isActiveOnly ? "checked" : ""%> onclick="return checkActiveOnly_onclick()" language="javascript" /><label for="CheckActiveOnly">仅显示有效目录</label></td>
</tr>
</table>
</td>
</tr>
</table>
<br/><br/><br/>
</td>
</tr>
<tr>
<td colspan="2" style="BORDER-TOP: #999999 1px solid">
<table align="center" style="height: 50px" width="100%">
<tr>
<td><jsp:include page="../common/copyright_inc.jsp" flush="true"/></td>
</tr>
</table></td>
<tr>
</table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -