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

📄 menu_res_multimedia_tree.jsp

📁 jsp人事管理系统jsp+servlet
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/cms4j" prefix="cms4j" %>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>CMS4J</title>
<link href="../skin/blue/css/menu.css" rel="stylesheet" type="text/css">
<link href="../skin/blue/css/tree.css" rel="stylesheet" type="text/css">
<script src="../../js/common.js"></script>
<script src="../../js/tree/xtree.js"></script>
<script src="../../js/tree/xmlextras.js"></script>
<script src="../../js/tree/xloadtree.js"></script>
<script src="../../js/page_init.js"></script>
<script src="../../js/menu/menu.js"></script>

<link href="../skin/blue/css/menu/context_menu.css" rel="stylesheet" type="text/css">


<script>
function goto(target,URL){
	obj = eval("top." + target);
	obj.location.href = URL;
}
</script>

<%
if(!cn.com.dekn.cms.security.login.CMS4JUser.isLogin(request)){
%>
	<script>
		top.location.href="../login.jsp";
	</script>
<%
return;
}
%>

</head>

<script>
function displayOrHideMenu(objID){
	displayOrHide("menu_" + objID);
	
	var linkTable = document.getElementById("menu_" + objID);
	var obj = document.getElementById("menu_title_" + objID);
	
	if(obj){
		if(linkTable.style.display==""){
			obj.className = "menu-ctrl-bar-exp-button";
		}else{
			obj.className = "menu-ctrl-bar-col-button";
		}
	}
}

//页面初始化
function pageInit(){
	if(document.getElementById("NODE_ID")){
		selectInit("NODE_ID","${param.cluster_node_id}");
	}
}




function isOnMenu(){
	if(event.srcElement.parentNode.tagName.toUpperCase() == "DIV"){
		//alert(event.srcElement.parentNode.id);
		return true;
	}else{
		return false;
	}
}

// 右键菜单
function showContextMenu(event){
	var width = 90;
	var height = 0;
	var lefter = event.clientX;
	var topper = event.clientY;
	var oPopDocument = oPopupMenu.document;
	var oPopBody = oPopupMenu.document.body;

	var sMenu="";
	
	//if(isOnMenu()){
		//sMenu += getFormatMenuRow("cut", "添加子分类");
		//sMenu += getFormatMenuRow("copy", "修改");
		//sMenu += sMenuHr;
		//sMenu += getFormatMenuRow("delete", "删除");
		//sMenu += sMenuHr;
		//height += 62;
	//}else{
		sMenu += getMenuRow("", "openWindow('../pic/multi_class_add.jsp?cluster_node_id=root&is_close=1', 520, 350);", "", "添加子分类");
		sMenu += sMenuHr;
		sMenu += getMenuRow("", "tree.collapseAll()", "", "收起所有");
		sMenu += sMenuHr;
		sMenu += getMenuRow("", "location.href=location.href", "", "刷新");
		//sMenu += sMenuHr;
		height += 64;
	//}


	sMenu = sMenu1 + sMenu + sMenu2;

	oPopDocument.open();
	oPopDocument.write(StyleMenuHeader+sMenu);
	oPopDocument.close();

	height+=2;
	if(lefter+width > document.body.clientWidth) lefter=lefter-width;
	//if(topper+height > document.body.clientHeight) topper=topper-height;

	oPopupMenu.show(lefter, topper, width, height, document.body);
	return false;

}



</script>

<body onConTextMenu="event.returnValue=false;return showContextMenu(event);">


<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="2"></td>
  </tr>
  
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
	<script>
var tree = new WebFXTree("所有分类","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=')");
	tree.setBehavior('classic');	
	
	<% String tID = "";String tID2 = "";String tID3 = ""; String tID4 = ""; String tID5 = "";String tID6 = ""; %>
	<% int i = 0; %>
	<cms4j:picture_class site_id="root" class_type="multimedia">
	<%//取得某一节点的的栏目数
	int picClassCountForNode=cn.com.dekn.cms.pic.busi.PictureClassBean.getPictureClassCountForNode("root");
	//取得数据库中配置  采用异步树的树节点数
	int  sysConfigCount=cn.com.dekn.cms.util.StrUtil.getNotNullIntValue(cn.com.dekn.cms.syscfg.SysConfigHelper.getInstance().getValue("max_tree_node_count"));
	//判断是否某一节点的栏目数,是否超出数据库中配置的树节点数,超出刚采用异步
	if(!(picClassCountForNode<=sysConfigCount)){%>	
	<% //判断是否存在子节点
	if(pic_class_info.isHasChild()){%>
		var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXLoadTreeItem("<%=pic_class_info.getCLASS_NAME()%>","xmltree/xml_menu_res.jsp?parent_id=<%=pic_class_info.getCLASS_ID()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");		  
		tree.add(t_<%=pic_class_info.getCLASS_ID()%>);	
		<%}//判断是否存在子节点
		else {%>
		var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");		  
		tree.add(t_<%=pic_class_info.getCLASS_ID()%>);	
		<%}	}
		////判断是否采用异步
		else{ %>
		var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");
		tree.add(t_<%=pic_class_info.getCLASS_ID()%>);
		<% tID = "t_" + pic_class_info.getCLASS_ID(); %>
		
		<cms4j:picture_class site_id="root" class_type="multimedia">
			var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");
			<%=tID%>.add(t_<%=pic_class_info.getCLASS_ID()%>);
			
			<% tID2 = "t_" + pic_class_info.getCLASS_ID(); %>
			
			<cms4j:picture_class site_id="root" class_type="multimedia">
				var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");
				<%=tID2%>.add(t_<%=pic_class_info.getCLASS_ID()%>);
				
				<% tID3 = "t_" + pic_class_info.getCLASS_ID(); %>
			
				<cms4j:picture_class site_id="root" class_type="multimedia">
					var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");
					<%=tID3%>.add(t_<%=pic_class_info.getCLASS_ID()%>);
					
					<% tID4 = "t_" + pic_class_info.getCLASS_ID(); %>
				
					<cms4j:picture_class site_id="root" class_type="multimedia">
						var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");
						<%=tID4%>.add(t_<%=pic_class_info.getCLASS_ID()%>);
						
						<% tID5 = "t_" + pic_class_info.getCLASS_ID(); %>
				
						<cms4j:picture_class site_id="root" class_type="multimedia">
							var t_<%=pic_class_info.getCLASS_ID()%> = new WebFXTreeItem("<%=pic_class_info.getCLASS_NAME()%>","javascript:goto('mainFrame','../pic/multi_info_main.jsp?class_id=<%=pic_class_info.getCLASS_ID()%>')");
							<%=tID5%>.add(t_<%=pic_class_info.getCLASS_ID()%>);
							
							<% tID6 = "t_" + pic_class_info.getCLASS_ID(); %>					
						
						</cms4j:picture_class>					
					</cms4j:picture_class>			
				</cms4j:picture_class>				
			</cms4j:picture_class>				
		</cms4j:picture_class>
		<%}%>
	</cms4j:picture_class>

document.write(tree);
</script>
	</td>
  </tr>
</table>




</body>
</html>

⌨️ 快捷键说明

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