<%@ page language="C#" autoeventwireup="true" inherits="admin_label_columnzhanshi, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Import Namespace="D.BLL" %>
<!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>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />

    <script type="text/javascript" src="../../js/<%=B_Lang.getLang() %>/label.js"></script>

    <script src="../../js/Common.js" type="text/javascript"></script>

    <script type="text/javascript">
        var api = frameElement.api, W = api.opener;
        function Select(obj, Id, Name) {
            DianCMS_$(obj + "Name").value = Name;
            DianCMS_$(obj + "Id").value = Id;
        }

        function ListLayout(obj, Id) {
            var TypeCount = document.getElementsByName(obj);
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }
            for (var i = p; i < TypeCount.length; i++) {
                if (TypeCount[i].checked) {
                    var DivType = eval("Layout_" + Id + "_1");
                    if (TypeCount[i].value == "div") {
                        DivType.style.display = "";
                        Direction(Id);
                    }
                    else {
                        var DivType2 = eval("Layout_" + Id + "_2");
                        var DivType3 = eval("Layout_" + Id + "_3");
                        DivType.style.display = "none";
                        DivType2.style.display = "";
                        DivType3.style.display = "none";
                    }
                }
            }
        }

        function Direction(Id) {
            var DivType2 = eval("Layout_" + Id + "_2");
            var DivType3 = eval("Layout_" + Id + "_3");
            var c = document.getElementsByName("RadDirectionList_" + Id + "");
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }
            for (var i = p; i < c.length; i++) {
                if (c[i].checked) {
                    if (c[i].value == "H") {
                        DivType2.style.display = "none";
                        DivType3.style.display = "none";
                    }
                    else {
                        DivType2.style.display = "";
                        DivType3.style.display = "";
                    }
                }
            }
        }

        function Transfer(name) {
            var TypeCount = document.getElementsByName("RadTransfer");
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }

            for (var i = p; i < TypeCount.length; i++) {
                if (TypeCount[i].checked) {
                    switch (TypeCount[i].value) {
                        case "1":
                            DianCMS_$("DivNavigationSelectColumn").style.display = "";
                            break;
                        case "2":
                        case "3":
                            DianCMS_$("DivNavigationSelectColumn").style.display = "none";
                            break;
                        case "4":
                            DianCMS_$("DivNavigationSelectColumn").style.display = "none";
                            break;
                    }
                    break;
                }
                else {
                    DianCMS_$("DivNavigationSelectColumn").style.display = "none";
                }
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center" style="margin-top:5px;">
        <tr>
            <td class="bqleft">
                调用方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="RadTransfer" runat="server" RepeatDirection="Horizontal"
                    onclick="Transfer()">
                    <asp:ListItem Value="1" Selected="True">指定栏目</asp:ListItem>
                    <asp:ListItem Value="2">当前同级栏目</asp:ListItem>
                    <asp:ListItem Value="3">当前下一级栏目</asp:ListItem>
                    <asp:ListItem Value="5">当前上一级栏目</asp:ListItem>
                    <asp:ListItem Value="4">所有栏目</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="bqleft">调用数量：</td>
            <td class="bqright"><asp:TextBox ID="txtColumnNum" runat="server" CssClass="in1" Rows="10" Text="-1"
                    Columns="10"></asp:TextBox> -1为显示全部</td>
        </tr>
        <tr>
            <td class="bqleft">
                引用样式：
            </td>
            <td class="bqright" height="28">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td>
                            <div onmousemove="ShowDiv('4');ShowClassDiv()" onmouseout="HiddenDiv('4');HiddenClassDiv()"
                                id="Href4" style="z-index: 100; display: none; width: 322px; position: absolute;
                                visibility: visible; height: 200px; overflow: auto; margin-top: 21px;">
                                <table class="xiala" cellpadding="2" cellspacing="0" border="0" width="100%">
                                    <asp:Repeater ID="Repeater4" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''" style="cursor: pointer">
                                                <td onclick="Select('txtColNavStyle','<%#Eval("StyleId") %>','<%#Eval("Name") %>');HiddenDiv('4');HiddenClassDiv()"
                                                    style="cursor: pointer">
                                                    <span>
                                                        <%#Eval("Name") %></span>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''">
                                        <td>
                                            <span><b>■以下为通用样式■</b></span>
                                        </td>
                                    </tr>
                                    <asp:Repeater ID="Repeater8" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''" style="cursor: pointer">
                                                <td onclick="Select('txtColNavStyle','<%#Eval("StyleId") %>','<%#Eval("Name") %>');HiddenDiv('4');HiddenClassDiv()"
                                                    style="cursor: pointer">
                                                    <span>
                                                        <%#Eval("Name") %></span>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtColNavStyleName" Text="选择样式" runat="server" CssClass="in1" Style="width: 320px;"
                                onclick="ShowDiv('4');ShowClassDiv()" onmouseout="HiddenDiv('4');HiddenClassDiv()"></asp:TextBox><asp:TextBox
                                    ID="txtColNavStyleId" runat="server" CssClass="in1" Style="display: none"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                布局方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="RadNavigationLayout" runat="server" RepeatDirection="Horizontal"
                    onclick="ListLayout('RadNavigationLayout','3')">
                    <asp:ListItem Value="table" Selected="True">Table</asp:ListItem>
                    <asp:ListItem Value="div">Div+css</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr style="display: none" id="Layout_3_1">
            <td class="bqleft">
                排列方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="RadDirectionList_3" runat="server" RepeatDirection="Horizontal"
                    onclick="Direction('3')">
                    <asp:ListItem Value="H" Selected="True">横向排列</asp:ListItem>
                    <asp:ListItem Value="V">纵向排列</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr id="Layout_3_2">
            <td class="bqleft">
                显示列数：
            </td>
            <td class="bqright" height="28">
                <asp:TextBox ID="txtNavigationColumn" runat="server" CssClass="in1" Rows="30" Text="1"
                    Columns="10"></asp:TextBox>
            </td>
        </tr>
        <tr id="Layout_3_3" style="display: none">
            <td class="bqleft">
                列控制代码：
            </td>
            <td class="bqright" height="28">
                &lt;<asp:TextBox ID="txtDivRepP3" runat="server" Text="p" Columns="4" CssClass="in1"></asp:TextBox>
                id="<asp:TextBox ID="txtDivRepId3" runat="server" Columns="4" CssClass="in1"></asp:TextBox>"
                class="<asp:TextBox ID="txtDivRepClass3" runat="server" Columns="4" CssClass="in1"></asp:TextBox>"&gt;
            </td>
        </tr>
        <tbody id="DivNavigationSelectColumn">
            <tr>
                <td class="bqleft">
                    选择栏目：
                </td>
                <td class="bqright" height="28">
                    <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                        <ContentTemplate>
                            <table cellpadding="0" cellspacing="0" border="0" id="ClassList">
                                <tr>
                                    <td valign="top" width="150" runat="server" id="tdFieldName">
                                        <asp:ListBox ID="ListFieldName" runat="server" SelectionMode="Single" Width="150px"
                                            Rows="13" AutoPostBack="True" OnSelectedIndexChanged="ListFieldName_SelectedIndexChanged">
                                        </asp:ListBox>
                                    </td>
                                    <td style="padding-left: 5px">
                                        <asp:ListBox ID="ColumnList" runat="server" Rows="13" SelectionMode="Multiple" Width="255px"
                                            title="按住“Ctrl”或“Shift”键可以多选，按住“Ctrl”可取消选择"></asp:ListBox>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    栏目属性：
                </td>
                <td class="bqright" height="28">
                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                        <tr>
                            <td>
                                <asp:CheckBox ID="CheckIsMyColumn" runat="server" Text="包含选中栏目" /><asp:CheckBox ID="CheckIsChildColumn"
                                    runat="server" Text="包含子栏目" />
                            </td>
                            <td align="right">
                                子栏目属性：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RadioChild" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected="True">下一级子栏目</asp:ListItem>
                                    <asp:ListItem Value="2">下级所有子栏目</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
        <tr>
            <td class="bqleft">
                标签类型：
            </td>
            <td class="bqright">
                <asp:CheckBox ID="ChColNavAjax" runat="server" Text="设置该标签为ajax标签" />
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                条件事项：
            </td>
            <td class="bqright">
                <font color="red">可在Where条件里使用如：EnName like '%a%'的SQL语句</font>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="40">
                <asp:Button ID="Button8" runat="server" Text=" 确认 " CssClass="btn radius30 pad_0_30" OnClick="Button8_Click" />
            </td>
        </tr>
    </table>
    </form>
    <asp:Literal ID="LitMsg" runat="server"></asp:Literal>
</body>
</html>
