<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SourceListControl.ascx.cs"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Controls.Common.SourceListControl" %>
<script language="javascript" type="text/javascript">
       <!--
    document.write('<div    id=loadDiv    style="padding-top:    50;    padding-left:    50">正在加载页面，请稍候<span    id="loading"></span></div>');
    var setInterval1 = setInterval(" document.getElementById('loading').innerText    +=    '.'", 300);
    var setInterval2 = setInterval(" document.getElementById('loading').innerText    =    ''", 15000);

    function addLoadEvent(func) {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') {
            window.onload = func;
        } else {
            window.onload = function () {
                oldonload();
                func();
            }
        }
    }

    function Initial() {
        document.getElementById("hiddenDiv").style.display = "";    //显示页面内容   
        document.getElementById("loadDiv").parentNode.removeChild(document.getElementById("loadDiv"));
        clearInterval(setInterval1);
        clearInterval(setInterval2);
    }
    addLoadEvent(Initial);

       // -->
</script>
<div style="text-align: center; display: none" id="hiddenDiv">
    <% openerInput = Request.QueryString["BackControlId"];%>
    <%
        floatingDialog = Request.QueryString["floatingDialog"]; %>
    <table width="560" border="0" cellpadding="2" cellspacing="0" class="border">
        <tr class="title">
            <td align="left">
                <a href="SourceList.aspx?BackControlId=<%= openerInput %>&floatingDialog=<%=floatingDialog %>">
                    <asp:Localize ID="Localize1" Text="全部分类  " runat="server" /></a>
                <asp:Repeater ID="RptSourceType" runat="server" DataSourceID="OdsSourceType">
                    <ItemTemplate>
                        | <span style="cursor: pointer;" onclick="javascript:window.location = 'SourceList.aspx?SearchType=5&floatingDialog=<%=floatingDialog %>&BackControlId=<%= openerInput %>&type=<%# Eval("Name") %>';">
                            <%# Eval("Name")%>
                        </span>
                    </ItemTemplate>
                </asp:Repeater>
                <asp:ObjectDataSource ID="OdsSourceType" runat="server" SelectMethod="GetSourceTypeList"
                    TypeName="PowerEasy.Module.General.BusinessLogic.Accessories.Source"></asp:ObjectDataSource>
            </td>
        </tr>
    </table>
    <br />
    <table width="560" border="0" style="text-align: center" cellpadding="2" cellspacing="0"
        class="border">
        <tr class="title">
            <td align="left">
                <b>
                    <asp:Localize ID="Localize2" Text="列表：" runat="server" /></b>
            </td>
            <td align="right">
                <asp:TextBox ID="TxtSource" runat="server"></asp:TextBox>&nbsp;&nbsp;<asp:Button
                    ID="BtnSearch" runat="server" Text="查找 " />
            </td>
        </tr>
        <tr>
            <td valign="top" colspan="2">
                <asp:Repeater ID="RptSource" runat="server" OnItemDataBound="RptSource_ItemDataBound">
                    <HeaderTemplate>
                        <table width="550" border="0" cellspacing="1" cellpadding="1" style="background-color: #f9f9f9">
                            <tr align="center">
                                <td style="width: 100px">
                                    <asp:Localize ID="Localize5" Text="名称  " runat="server" />
                                </td>
                                <td style="width: 100px">
                                    <asp:Localize ID="Localize3" Text="来源分类  " runat="server" />
                                </td>
                                <td>
                                    <asp:Localize ID="Localize4" Text="简介  " runat="server" />
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td align="center" width="100px">
                                <pe:ExtendedLiteral ID="LitSource" runat="server"></pe:ExtendedLiteral>
                            </td>
                            <td width="100px">
                                <%# Eval("type")%>
                            </td>
                            <td>
                                <%# Eval("intro")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
            </td>
        </tr>
    </table>
    <pe:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged">
    </pe:AspNetPager>
    <script language="javascript" type="text/javascript">
        function add(obj) {
            if (obj == "") { return false; }
            parent.document.getElementById("<%= openerInput %>").value = obj;
            parent.document.getElementById("<%= floatingDialog %>").style.display = "none";
            parent.document.getElementById('jqDnrFloatDivBg').style.display = "none";
        }
    </script>
</div>
