<%@ page language="C#" autoeventwireup="true" inherits="admin_label_putonglist, 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 = "";
                    }
                }
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <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:DropDownList ID="ColumnType" runat="server" onchange="selColumn(this.value,'txtSelectColumn','')">
                    <asp:ListItem Value="0">整个模型</asp:ListItem>
                    <asp:ListItem Value="1">当前栏目</asp:ListItem>
                    <asp:ListItem Value="2">选择栏目</asp:ListItem>
                </asp:DropDownList>
                <span style="display: none" id="spanIsChildColumn">
                    <asp:CheckBox ID="IsChildColumn" runat="server" Text="是否包含子栏目" /><asp:CheckBox ID="IsParentColumn"
                        runat="server" Text="是否包含父栏目" /></span><asp:TextBox ID="txtSelectColumn" runat="server"
                            Style="display: none"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                调用数据：
            </td>
            <td class="bqright" height="28">
                <asp:TextBox ID="txtInfoNum" runat="server" CssClass="in1" Rows="30" Text="10" Columns="10"></asp:TextBox>
                条 如果为0则显示所有数据
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                布局方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="Layout" runat="server" RepeatDirection="Horizontal" onclick="ListLayout('Layout','1')">
                    <asp:ListItem Value="table" Selected="True">普通表格</asp:ListItem>
                    <asp:ListItem Value="div">Div+Css</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr style="display: none" id="Layout_1_1">
            <td class="bqleft">
                排列方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="RadDirectionList_1" runat="server" RepeatDirection="Horizontal"
                    onclick="Direction('1')">
                    <asp:ListItem Value="H" Selected="True">横向排列</asp:ListItem>
                    <asp:ListItem Value="V">纵向排列</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr id="Layout_1_2">
            <td class="bqleft">
                内容列表列数：
            </td>
            <td class="bqright" height="28">
                <asp:TextBox ID="txtColumn" runat="server" CssClass="in1" Text="1" Columns="10"></asp:TextBox>
            </td>
        </tr>
        <tr id="Layout_1_3" style="display: none">
            <td class="bqleft">
                列控制代码：
            </td>
            <td class="bqright" height="28">
                &lt;<asp:TextBox ID="txtDivRepP" runat="server" Text="p" Columns="4" CssClass="in1"></asp:TextBox>
                id="<asp:TextBox ID="txtDivRepId" runat="server" Columns="4" CssClass="in1"></asp:TextBox>"
                class="<asp:TextBox ID="txtDivRepClass" runat="server" Columns="4" CssClass="in1"></asp:TextBox>"&gt;
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                引用样式：
            </td>
            <td class="bqright" height="28">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td>
                            <div onmousemove="ShowDiv('4')" onmouseout="HiddenDiv('4')" id="Href4" style="z-index: 100;
                                display: none; width: 322px; position: absolute; visibility: visible; height: 200px;
                                margin-top: 21px;overflow: auto">
                                <table align="center" cellpadding="2" cellspacing="0" width="100%" class="xiala">
                                    <asp:Repeater ID="Repeater1" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''">
                                                <td onclick="Select('txtStyle','<%#Eval("StyleId") %>','<%#Eval("Name") %>');HiddenDiv('4')"
                                                    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="Repeater5" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''">
                                                <td onclick="Select('txtStyle','<%#Eval("StyleId") %>','<%#Eval("Name") %>');HiddenDiv('4')"
                                                    style="cursor: pointer">
                                                    <span>
                                                        <%#Eval("Name") %></span>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtStyleName" Text="选择样式" runat="server" CssClass="in1" Style="width: 320px;cursor:pointer" onclick="ShowDiv('4')" onmouseout="HiddenDiv('4')"></asp:TextBox><asp:TextBox
                                    ID="txtStyleId" 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:TextBox ID="txtDateRange" runat="server" CssClass="in1" Text="0" Columns="5"></asp:TextBox>
                天的文章 0为显示所有文章
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                排序方式：
            </td>
            <td class="bqright">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td>
                            <%=D.BLL.B_Common.XiaLaOrder("XiaLaOrder")%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtOrderName" Text="自动编号降序" runat="server" CssClass="in1" Style="width:153px;cursor:pointer" onclick="ShowDiv('XiaLaOrder')" onmouseout="HiddenDiv('XiaLaOrder')"></asp:TextBox><asp:TextBox ID="txtOrderId" runat="server" CssClass="in1"
                                    Text="Id desc" Style="display: none"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                辅助功能：
            </td>
            <td class="bqright" height="28">
                <table width="100%" cellpadding="2" border="0">
                    <tr>
                        <td>
                            字符截取数：<asp:TextBox ID="txtLength" runat="server" CssClass="in1" Columns="5" Text="23"
                                ToolTip="一个中文两个字符"></asp:TextBox>
                        </td>
                        <td>
                            时间格式化：
                        </td>
                        <td>
                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                <tr>
                                    <td>
                                        <%=D.BLL.B_Common.XiaLaFormatTime("FormatTime")%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtFormatTimeName" Text="2009-06-19" runat="server" CssClass="in1" onclick="ShowDiv('FormatTime')" onmouseout="HiddenDiv('FormatTime')" style="width:138px;cursor:pointer"></asp:TextBox><asp:TextBox ID="txtFormatTimeId"
                                                runat="server" CssClass="in1" Text="yyyy-MM-dd" Style="display: none"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                数据筛选：
            </td>
            <td class="bqright" height="28">
                <asp:CheckBoxList ID="ChkWhere" runat="server" RepeatColumns="6" RepeatDirection="Horizontal">
                </asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                连接关系：
            </td>
            <td class="bqright" height="28">
                <table cellpadding="4" cellspacing="0" border="0">
                    <tr>
                        <td>
                            <asp:RadioButtonList ID="radioLink" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Value="and" Selected="True">and连接</asp:ListItem>
                                <asp:ListItem Value="or">or连接</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td>
                            针对多个数据筛选情况下使用
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                循环行样式：
            </td>
            <td class="bqright" height="28">
                每显示<asp:TextBox ID="txtRowInsert" runat="server" Columns="10" CssClass="in1"></asp:TextBox>
                条后，向列表中插入<asp:TextBox ID="txtInsertHtml" runat="server" Columns="18" CssClass="in1"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                标签类型：
            </td>
            <td class="bqright" height="28">
                <div id="ajax">
                    <asp:CheckBox ID="ajax1" runat="server" Text="设置该标签为ajax标签" onClick="chooseOne(this,'ajax');" /><br />
                    <asp:CheckBox ID="ajax2" runat="server" Text="设置该标签定时刷新" onClick="chooseOne(this,'ajax');" />&nbsp;&nbsp;&nbsp;
                    (目前只支持div)&nbsp;&nbsp;刷新时间：<asp:TextBox ID="Timer" runat="server" Text="1000" Columns="6"
                        CssClass="in1" title="1000毫秒=1秒"></asp:TextBox>毫秒</div>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="40">
                <asp:Button ID="Button1" runat="server" Text=" 确认 " CssClass="btn" OnClick="Button1_Click" /><input id="Button6" type="button" value=" 取消 " onclick="frameElement.api.close();"
                    class="btn" style="margin-left: 20px" />
            </td>
        </tr>
    </table>
    </form>

    <script>
        function selColumn(val, input, name) {
            switch (val) {
                case "0":
                    DianCMS_$("span" + name + "IsChildColumn").style.display = "none";
                    DianCMS_$("txtSelectColumn").value = "";
                    break;
                case "1":
                    DianCMS_$("span" + name + "IsChildColumn").style.display = "";
                    break;
                case "2":
                    DianCMS_$("span" + name + "IsChildColumn").style.display = "none";
                    Win_Open('SelectColumn.aspx?ModelId=<%=Request.QueryString["ModelId"] %>&ControlId=' + input + '', '', '700', '520')
            }
        }
    </script>

    <asp:Literal ID="LitMsg" runat="server"></asp:Literal>
</body>
</html>
