<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List_Object.aspx.cs" Inherits="MYAPP.Manage.Project.Design.Object.List_Object" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Object</title>
<link href="/CSS/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/coe.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script language="JavaScript" type="text/javascript" src="/js/odialog.js"></script>
<Script Language="JavaScript" type="text/JavaScript" src="/js/showo_page.js"></Script>
<script language="JavaScript" type="text/javascript">
    function close_dialog()
    {
        new dialog().reset();
    }
	
	function ExportSingleSwf(object_id) //导出单个物体swf文件
	{
		var ret=AjaxDemo.ExportSingleSwf(<%=_Tour_ID%>,object_id).value;
		if (ret=="true")
		{
			alert("360物体SWF文件导出完成!!!");
			window.open("/Project/<%=_Tour_ID%>/Object/"+object_id+".swf");
		}
		else
		{
			alert("错误: "+ret);
		}
	}
	
	function CreatObjectProject(object_id) //创建360物体项目文件
	{
		var ret=AjaxDemo.CreatObjectProject(<%=_Tour_ID%>,object_id).value;
		if (ret=="true")
		{
			alert("360物体项目创建成功!!!");
			//window.open("/Project/<%=_Tour_ID%>/Object/"+object_id+".swf");
		}
		else
		{
			alert("错误: "+ret);
		}
	}
	
	function ViewSingleSwf(object_id) //预览单个物体swf文件
	{
		window.open("/Project/<%=_Tour_ID%>/Object/"+object_id+".swf");
	}
	
	function CopySingleSwf(object_id) //拷贝单个物体swf文件
	{
		copyToClipboard("Object/"+object_id+".swf");
		alert("URL地址: Object/"+object_id+".swf"+"  地址已经复制到剪贴板中!");
	}
	
function changevalue(_path,_field,_object,_value)
{
	var ret=AjaxDemo.ChangeValue(<%=_Tour_ID%>,_object,_path,_field,_value).value;
	if (ret=="true")
	{
		if (_field=="Name")
		{
		}
	}
	else
	{
		alert(ret);
	}
}
</script>
</head>

<body onLoad="">
<form id="theform" runat="server" enableviewstate="false">
  <table width="100%" cellspacing="2" border="1" align="center" cellpadding="0" bordercolor="#CCCCCC"
            class="board_kong">
    <tr>
      <td><table cellspacing="1" cellpadding="0" width="100%" border="0">
          <tr>
            <td style="border-bottom: #CCCCCC 1px solid; height: 24px"><table class="title_table">
                <tr>
                  <td class="l_title">[360物体管理]</td>
                  <td width="180" align="center" ><input type="button" class="width80px" onClick="openWindow('ADD_Object.aspx?action=add&Tour_ID=<%=_Tour_ID%>&Object_ID=0', '550', '184', '新建项目' ,'no');" value="新建项目"/>
                  <input type="button"  value="刷新窗口" onClick="window.location=window.location;" class="width80px" /></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td>  <table width="100%" border="1"  align="center" cellpadding="0" cellspacing="1" bordercolor="#EBEBEB" class="board_kong"><tr>
                  <td height="22"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
                      <tr class="table_title">
                        <td width="40" align="center" bgcolor="#D7F2FF" class="tab_bottom_line"><input type="checkbox" onClick="setCheckboxes('theform','checkbox',this.checked)" /></td>
                        <td width="40" align="center" nowrap bgcolor="#D7F2FF" class="tab_bottom_line">物体ID</td>
                        <td height="20" align="center" nowrap bgcolor="#D7F2FF" class="tab_bottom_line">项目名称</td>
                        <td width="70" align="center" nowrap bgcolor="#D7F2FF" class="tab_bottom_line">日期</td>
                        <td width="40" align="center" nowrap bgcolor="#D7F2FF" class="tab_bottom_line">导出</td>
                        <td width="40" align="center" nowrap bgcolor="#D7F2FF" class="tab_bottom_line">图片</td>
                        <td width="40" align="center" nowrap bgcolor="#D7F2FF" class="tab_bottom_line">地址</td>
                        <td width="40" align="center" bgcolor="#D7F2FF" class="tab_bottom_line">热点</td>
                        <td width="40" align="center" bgcolor="#D7F2FF" class="tab_bottom_line">设计</td>
                        <td width="40" align="center" bgcolor="#D7F2FF" class="tab_bottom_line">生成</td>
                        <td width="40" align="center" bgcolor="#D7F2FF" class="tab_bottom_line">预览</td>
                        <td width="40" height="20" align="center" bgcolor="#D7F2FF" class="tab_bottom_line">操作</td>
                      </tr>
                      <asp:Repeater ID="rp_list" runat="server" DataSource="<%#list_dt%>">
                        <ItemTemplate>
                          <tr onMouseOver="this.className='tr_onmouseover'" onMouseOut="this.className='tr_onmouseout'" >
                            <td align="center" nowrap="nowrap" class="tab_bottom_line"><input type="checkbox" name="checkbox" value="<%# Eval("Name").ToString().Trim()%>" /></td>
                            <td height="18" align="center" nowrap="nowrap" class="tab_bottom_line"><%# Eval("Name").ToString().Trim()%></td>
                            <td nowrap="nowrap" class="tab_bottom_line"><input type="text" value="<%#GetElemValueByPath(Eval("Name"),"Name")%>" onChange="changevalue('Project','Name','<%# Eval("Name").ToString().Trim()%>',this.value);" style="width:100%"/></td>
                            <td width="80" align="center" nowrap="nowrap" class="tab_bottom_line"><%#GetElemValueByPath(Eval("Name"),"Date")%></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><input type="button" class="cursor_pointer" value="SWF" onClick="ExportSingleSwf('<%# Eval("Name").ToString().Trim()%>');"  title="生成360物体SWF文件"/></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><input type="button" class="cursor_pointer" value="图片" onClick="window.open('../Tour/List_Accessories_Info.aspx?curl=Object/<%# Eval("Name").ToString().Trim()%>&dir=Object/<%# Eval("Name").ToString().Trim()%>&Info_ID=<%=_Tour_ID%>','Accessories_Info','toolbar=no,resizable=yes,status=yes');"  title="360物体图片管理"/></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><input type="button" class="cursor_pointer" value="拷贝" onClick="CopySingleSwf('<%# Eval("Name").ToString().Trim()%>');"  title="复制360物体SWF文件URL地址"/></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><input type="button" class="cursor_pointer" value="标注" onClick="window.location='Export_TourXml.aspx?action=Publish&Tour_ID=<%#Eval("Name")%>';"/></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><a href="#">设计</a></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><input type="button" class="cursor_pointer" value="生成" onClick="CreatObjectProject('<%# Eval("Name").ToString().Trim()%>');"  title="生成360物体SWF文件"/></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><input type="button" class="cursor_pointer" value="预览" onClick="ViewSingleSwf('<%# Eval("Name").ToString().Trim()%>');"  title="预览360物体SWF文件"/></td>
                            <td width="40" align="center" nowrap="nowrap" class="tab_bottom_line"><a href="ADD_Object.aspx?action=del&Tour_ID=<%=_Tour_ID%>&Object_ID=<%#Eval("Name")%>" style="color:#FF0000" onClick="delete_confirm()"><img src="/images/operate/del.gif" width="16" height="16" border="0" title="删除" /></a></td>
                          </tr>
                        </ItemTemplate>
                      </asp:Repeater>
                  </table></td>
                </tr>
                
                <tr class="">
                  <td height="24" align="center"><table border="0" cellpadding="0" cellspacing="0">
  <tr >
    <td><script Language=JavaScript>
ShowoPage("<table style='BORDER-COLLAPSE: collapse' borderColor='#111111' height='10' cellSpacing='0' cellPadding='0' width='100%' border='0'><tr><td vAlign='bottom' width='40%' style='font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; line-height: 15px'>","</td></tr></table>","页数:<font color='#006666'>","</font>/","<font color='#FF00FF'>","</font>&nbsp;","&nbsp;<font color='#000080'>","</font> 每页&nbsp;","&nbsp;<font color='orange'>记录</font>:<font color='green'>","</font></td><td vAlign='bottom' align='right' style='font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; line-height: 15px'>","首页","前页","后页","末页","&nbsp;&nbsp;Jump:","<font color='red'>","</font>","","","<font color='red'>","</font>","&nbsp;[","]&nbsp;",<%=RecordCount%>,<%=PageRecord%>,8)
</script></td>
  </tr>
</table>
</td>
                </tr>
            </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>

