<%@ page contentType="text/html; charset=GBK" session="false"%>

<%@ taglib uri="/cmsTag" prefix="cms"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base target="_self" />
		
		<title></title>
		<link rel="stylesheet" type="text/css" href="../style/default/main.css" />
		<!--加载 js -->



		<script>  
         if("ok"==="${param.status}")
         {
         	
            window.returnValue="${param.status}";
            window.close();        
         }
         else
         {     
          
            window.name="sortContentForm";
         }
      </script>




		<!--加载 js 结束 -->


	</head>

	<body>
		<button type="button" id="save" onclick='javascript:sortContent("${param.targetId}");'>
			<img src="../../../core/style/icon/sort-number.png" alt="" />
			确定
		</button>
		&nbsp; 当前所选内容将出现在以下所选内容之前


		<br>
		<br>
		<cms:SystemManageContentList page="true" pageSize="12" classId="${param.classId}" modelId="${param.modelId}">
			<div>
				<page:page />
			</div>
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
				<tr>
					<td width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
						<div align="center">

						</div>
					</td>
					<td width="5%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
						<div align="center">
							<span class="STYLE1">ID</span>
						</div>
					</td>
					<td width="45%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
						<div align="center">
							<span class="STYLE1">文章标题</span>
						</div>
					</td>
					


				</tr>

				<cms:Content>
					<tr>
						<td height="20" bgcolor="#FFFFFF" style="margin-top: 10px;">
							<div align="center">
								<input type="radio" name="nextIdCheck" id="nextIdCheck" value="${Info.contentId}" onclick="javascript:regId(this)" />
							</div>
						</td>

						<td height="20" bgcolor="#FFFFFF" style="margin-top: 10px;">
							<div align="center" class="STYLE1">
								<div align="center">
									${Info.contentId}
								</div>
							</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" style="margin-top: 50px;">
							<div align="left">
								<span class="STYLE1">&nbsp; ${Info.title }</span>
							</div>
						</td>
						


					</tr>
				</cms:Content>


			</table>

		</cms:SystemManageContentList>
		<div>
			<page:page />
		</div>

		<form method="post" id="sortContentForm" name="sortContentForm">
			<input type="hidden" id="targetId" name="targetId" value="${param.targetId}">
			<input type="hidden" id="nextId" name="nextId" value="-1">
		</form>

		</div>
		<div id="divProcessing" style="width:260px;height:60px;position:absolute;left:230px;top:100px;display:none">
			<table border=0 cellpadding=0 cellspacing=1 bgcolor="#000000" width="100%" height="100%">
				<tr>
					<td bgcolor=#3A6EA5>
						<marquee align="middle" behavior="alternate" scrollamount="5">
							<font color=#FFFFFF>...正在对内容进行排序...请等待...</font>
						</marquee>
					</td>
				</tr>
			</table>
		</div>
	</body>

</html>
<script type="text/javascript">

document.getElementById('targetId').value=window.dialogArguments;;

function regId(next)
{
   if(next.checked == true)
   {
      document.getElementById("nextId").value = next.value;
   }


}

function sortContent(targetId)
{
    var nextId =  document.getElementById("nextId").value;
    if(nextId == -1)
    {
        alert("请选择目标内容！");
        return;
    }
    
    if(nextId == document.getElementById("targetId").value)
    {
        alert("不可和自身排序！");
        return;
    
    }
    
   document.getElementById("divProcessing").style.display='';
   document.all.sortContentForm.action="../../content/sortContent.cmd";
   document.all.sortContentForm.submit();
   
 

}






</script>
