<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Contents.CategoryOrder" ValidateRequest="false"
    Codebehind="CategoryOrder.aspx.cs" Title="节点排序" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="Server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="Server">
    <script language="JavaScript" type="text/javascript" src="<%=BasePath %>Admin/JS/tool-man/core.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=BasePath %>Admin/JS/tool-man/events.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=BasePath %>Admin/JS/tool-man/css.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=BasePath %>Admin/JS/tool-man/coordinates.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=BasePath %>Admin/JS/tool-man/drag.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=BasePath %>Admin/JS/tool-man/dragsort.js"></script>
    <script language="JavaScript" type="text/javascript"><!--
	var dragsort = ToolMan.dragsort()
	var junkdrawer = ToolMan.junkdrawer()

	window.onload = function() {
		
		junkdrawer.restoreListOrder("phoneticlong")
		
		dragsort.makeListSortable(document.getElementById("phoneticlong"),verticalOnly)
	}

	function verticalOnly(item) {
		item.toolManDragGroup.verticalOnly()
	}
    function OrderList()
    {
      document.getElementById("<%=HdnSerNodeList.ClientID %>").value=  junkdrawer.serializeList(document.getElementById('phoneticlong'));
    
    }
	//-->
    </script>

    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="OdsCategoryOrder">
        <HeaderTemplate>
            <div class="ol_wrapper">
                <dl>
                    <dt>节点名 [注意：鼠标放到栏目名上点击可拖动排序]</dt>
                    <dd id="phoneticlong">
                        <ul>
        </HeaderTemplate>
        <ItemTemplate>
            <li itemid="<%#Eval("NodeId") %>"><a href="javascript:" title="点击拖动">
                <asp:Label ID="LabNodeName" runat="server" Text='<%#Eval("NodeName") %>'></asp:Label></a>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul> </dd> </dl></div>
        </FooterTemplate>
    </asp:Repeater>
    <asp:HiddenField ID="HdnSerNodeList" runat="server" />
    
    <br />
    <div style="text-align: center;">
        <asp:Button ID="EBtnSetOrderId" Text="保存排序" OnClick="EBtnSetOrderId_Click" OnClientClick="OrderList();BOX_show('RegUser');"
            runat="server" />
        <asp:Button ID="BtnBack" runat="server" Text="恢复设置" OnClick="BtnBack_Click" />
    </div>
    <asp:ObjectDataSource ID="OdsCategoryOrder" runat="server" DataObjectTypeName="PowerEasy.Module.General.Model.Contents.NodeInfo"
        SelectMethod="GetNodesListByParentId" TypeName="PowerEasy.Module.General.BusinessLogic.Contents.Nodes">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="parentId" QueryStringField="NodeId"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <pec:ShowWait ID="ShowWait" runat="server" />
</asp:Content>
