<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Template_AddControl.aspx.cs"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Template.Template_AddControl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加的页面的控件</title>
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr height="30">
            <td bgcolor="#999999" valign="middle">
                <img src="../../Admin/Images/img_u.gif" alt="" /><span style="color: #0000FF; font-weight: bold;
                    font-size: 18px;">添加的页面的控件</span>
            </td>
        </tr>
        <tr>
            <td>
                <div style="height: 100%;border: 1px double #ffffff">
                    <div style="width: 100%; text-align: center; background: #9999bb">
                        请选择你要添加的页面的控件</div>
                    <div style="width: 95%; text-align: center">
                        <asp:Panel ID="pnlContent" runat="server">
                            <table style="text-align: left;">
                                <tr>
                                    <td>
                                        页面：
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlDataSource" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDataSource_SelectedIndexChanged">
                                            <asp:ListItem Text="请选择" Value="-1"></asp:ListItem>
                                        </asp:DropDownList>
                                        <br />
                                        选择页面一定要与动态页模板配置中的配置一致，不然调用的控件将不起作用。
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        控件：
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlFields" runat="server">
                                            <asp:ListItem Text="请选择" Value="-1"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <pe:ExtendedLabel ID="lblMsg" runat="server" HtmlEncode="false" Visible="false"></pe:ExtendedLabel>
                        <asp:Panel ID="pnlNoFieldsTip" runat="server">
                            控件将以{PE.Control.***/}的形式插入到模板中。
                            <br />
                        </asp:Panel>
                    </div>
                </div>
            </td>
        </tr>
        <tr height="40">
            <td bgcolor="#999999" color="#ffffff" align="center">
                <input type="button" runat="server" id="btnAdd" class="inputbutton" value="添加" onclick="submitdate();" />&nbsp;&nbsp;
                <input type="button" class="inputbutton" value="取消" onclick="drapDrop();" />
            </td>
        </tr>
    </table>
    <script language="JavaScript" type="text/javascript">
    <!--

        function drapDrop() {
            parent.closeByButton = false;
            parent.CloseWindow();
        }
        function submitdate() {
            var returnstr;
            var fields = document.getElementById("<% =ddlFields.ClientID %>");
            if (fields.value == "-1") {
                returnstr = "";
            } else {
                returnstr = "{PE.Control." + fields.value + "/}";
            }
            if (returnstr != "") {
                if (parent.isRightMenu) {
                    parent.setlabel(returnstr);
                }
                else {
                    parent.getInsertText(returnstr);
                }
                parent.closeByButton = true;
            }
            parent.CloseWindow();
        }
    -->
    </script>
    </form>
</body>
</html>
