<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeBehind="CategoryOrder.aspx.cs" ValidateRequest="false" Inherits="PowerEasy.Module.General.WebSite.Admin.RedirectUrl.CategoryOrder"
    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("<%=HdnList.ClientID %>").value = junkdrawer.serializeList(document.getElementById('phoneticlong'));

        }
	//-->
    </script>

    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="OdsCategory">
        <HeaderTemplate>
            <div class="ol_wrapper">
                <dl>
                    <dt>链接类别名称 [注意：鼠标放到栏目名上点击可拖动排序]</dt>
                    <dd id="phoneticlong">
                        <ul>
        </HeaderTemplate>
        <ItemTemplate>
            <li itemid="<%#Eval("CategoryID") %>"><a href="javascript:" title="点击拖动">
                <asp:Label ID="CategoryName" runat="server" Text='<%#Eval("CategoryName") %>'></asp:Label></a>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul> </dd> </dl></div>
        </FooterTemplate>
    </asp:Repeater>
    <asp:HiddenField ID="HdnList" runat="server" />
    <br />
    <div style="text-align: center;">
        <asp:Button ID="EBtnSetOrderId" Text="保存排序" OnClick="EBtnSetOrderId_Click" OnClientClick="OrderList()"
            runat="server" />
        &nbsp;&nbsp;
        <asp:Button ID="BtnBack" runat="server" Text="恢复设置" OnClick="BtnBack_Click" />
    </div>
    <asp:ObjectDataSource ID="OdsCategory" runat="server" SelectMethod="GetRedirectCategoryList"
        TypeName="PowerEasy.Module.General.BusinessLogic.Accessories.RedirectCategory">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="" Name="keyword" QueryStringField="KeyWord"
                Type="String" />
            <asp:QueryStringParameter DefaultValue="0" Name="listType" QueryStringField="ListType"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
