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

📄 roleslist.jsp

📁 一个实用的CMS管理
💻 JSP
字号:
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="true">
  <head>
  <title><s:text name="suncms.article.view.article.org_manage" /></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="robots" content="noindex, nofollow">
 <link rel="stylesheet" type="text/css" href="css/extremecomponents.css"> 
<s:head /> 
		<script src="scripts/prototype.js" type="text/javascript">
</script>
		<script src="scripts/json.js" type="text/javascript">
</script>
		<script language="JavaScript">
			function validateName()
			{
				//请求的地址
				var url = 'validateName_checkrole.action';
				var params = Form.serialize('addnew');
				//创建Ajax.Request对象,对应于发送请求
				var myAjax = new Ajax.Request(
				url,
				{
					//请求方式:POST
					method:'post',
					//请求参数
					parameters:params,
					//指定回调函数
					onComplete: processResponse,
					//是否异步发送请求
					asynchronous:true
				});
			}
			function processResponse(request)
			{
			 
				var action = request.responseText.parseJSON();
				document.getElementById("tip").innerHTML = action.tip;
				
			}	
		</script> 
		<script language="javascript">
function getSize() {
     var xScroll, yScroll;
     if (window.innerHeight && window.scrollMaxY) {
             xScroll = document.body.scrollWidth;
             yScroll = window.innerHeight + window.scrollMaxY;
     } else if (document.body.scrollHeight > document.body.offsetHeight){      // all but Explorer Mac
             xScroll = document.body.scrollWidth;
             yScroll = document.body.scrollHeight;
     } else {      // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
             xScroll = document.body.offsetWidth;
             yScroll = document.body.offsetHeight;
     }

     var windowWidth, windowHeight;
     if (self.innerHeight) {      // all except Explorer
             windowWidth = self.innerWidth;
             windowHeight = self.innerHeight;
     } else if (document.documentElement && document.documentElement.clientHeight) {      // Explorer 6 Strict Mode
             windowWidth = document.documentElement.clientWidth;
             windowHeight = document.documentElement.clientHeight;
     } else if (document.body) {      // other Explorers
             windowWidth = document.body.clientWidth;
             windowHeight = document.body.clientHeight;
     }

     // for small pages with total height less then height of the viewport
     if(yScroll < windowHeight){
             pageHeight = windowHeight;
             y = pageHeight;
     } else {
             pageHeight = yScroll;
             y = pageHeight;
     }

     if(xScroll < windowWidth){
             pageWidth = windowWidth;
     } else {
             pageWidth = xScroll;
     }

     arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
     return arrayPageSize;
}

function autoHeight(pid) {
     var x = new getSize();
     parent.document.getElementById(pid).height=x[1];
}

</script>
  </head>
    <body>
 <s:set name="orgsublist" value='getText("suncms.article.view.article.roles_name")' scope="page"/>
 
 <ec:table 
		items="roleslist"
		imagePath="images/table/*.gif"
		title="${orgsublist}" 
		width="95%"
		rowsDisplayed="15"
		showStatusBar= "false"
		locale="${i18n_locale}"
		filterable="true"
		sortable="true"
		action="Roles_RolesList.action"
		showPagination="false"
		var="role"
		>
		<ec:row highlightRow="true">
			<ec:column property="role_name" title="suncms.article.view.article.role_name"/>
			<ec:column property="role_desc" title="suncms.article.view.article.roles_desc"/>
			<ec:column title="suncms.article.view.article.delete"
					filterable="FALSE" property="DELETE">
					<a href="OrgClass_deleteById.action?row_id=${role.row_id}"><s:text name="suncms.article.view.article.delete" /></a>
				</ec:column>
	</ec:row>
	</ec:table>
	
	 <hr width="95%" align="left">
<div class="eXtremeTable" >
<table border="0"  cellpadding="0"  cellspacing="0"  width="60%" >
	<tr>
		<td><span class="title" ><s:text name="suncms.article.view.article.roles_add" /></span></td>
		</tr>
</table>
 <s:form name="addnew" action="/Roles_addnew.action">
  <table  border="0"  cellspacing="0"  cellpadding="0"  class="tableRegion"  width="95%" >
	<tbody class="tableBody" >
	<tr class="odd" >
		<td width="20%" ><s:text name="suncms.article.view.article.role_name" /> </td>
		<td> <s:textfield name="role_name" value="" onblur="validateName();"/><span id="tip" style="color:red;font-weight:bold"></span></td>
	</tr>
	<tr class="even" >
		<td><s:text name="suncms.article.view.article.roles_desc" /> </td>
		<td> <s:textfield name="role_desc" value=""/></td>
	</tr>
	<s:hidden name="row_id2" value="%{row_id2}"/>
	<tr class="odd" >
		<td colspan="2"><s:submit key="suncms.article.view.article.submit"/></td>
	</tr>
	
	</tbody>
</table>
 </s:form>
  </div>
  <script language="javascript">
   		var x = new getSize();
    
     top.document.all.item("main").height = x[1]+20;
     
    </script>
  </body>
</html>

⌨️ 快捷键说明

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