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

<%@ Import Namespace="D.BLL" %>
<%@ Import Namespace="D.Common" %>
<!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/lhgdialog/lhgcore.lhgdialog.min.js?self=true&skin=<%=Function.GetCssNameColor()%>" type="text/javascript"></script>

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

    <script language="javascript" 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="UltimateColumnType" runat="server" onchange="selColumn(this.value,'txtUltimateColumnType','Ultimate')">
                    <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="spanUltimateIsChildColumn">
                    <asp:CheckBox ID="UltimateIsChildColumn" runat="server" Text="是否包含子栏目" /><asp:CheckBox
                        ID="IsParentColumn" runat="server" Text="是否包含父栏目" /></span><asp:TextBox ID="txtUltimateColumnType"
                            runat="server" Style="display: none"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                调用数据：
            </td>
            <td class="bqright" height="28">
                <asp:TextBox ID="txtUltimateInfoNum" runat="server" CssClass="in1" Text="0" Columns="10"></asp:TextBox>
                条 如果为0则显示所有数据
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                布局方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="UltimateLayout" runat="server" RepeatDirection="Horizontal"
                    onclick="ListLayout('UltimateLayout','2')">
                    <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_2_1">
            <td class="bqleft">
                排列方式：
            </td>
            <td class="bqright" height="28">
                <asp:RadioButtonList ID="RadDirectionList_2" runat="server" RepeatDirection="Horizontal"
                    onclick="Direction('2')">
                    <asp:ListItem Value="H" Selected="True">横向排列</asp:ListItem>
                    <asp:ListItem Value="V">纵向排列</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr id="Layout_2_2">
            <td class="bqleft">
                内容列表列数：
            </td>
            <td class="bqright" height="28">
                <asp:TextBox ID="txtUltimateColumn" runat="server" CssClass="in1" Text="1" Columns="10"></asp:TextBox>
            </td>
        </tr>
        <tr id="Layout_2_3" style="display: none">
            <td class="bqleft">
                列控制代码：
            </td>
            <td class="bqright" height="28">
                &lt;<asp:TextBox ID="txtDivRepP2" runat="server" Text="p" Columns="4" CssClass="in1"></asp:TextBox>
                id="<asp:TextBox ID="txtDivRepId2" runat="server" Columns="4" CssClass="in1"></asp:TextBox>"
                class="<asp:TextBox ID="txtDivRepClass2" 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">
                    <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;
                                overflow: auto;margin-top:21px;">
                                <table class="xiala" cellpadding="2" cellspacing="0" border="0" width="100%">
                                    <asp:Repeater ID="Repeater3" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''">
                                                <td onclick="Select('txtUltimateStyle','<%#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="Repeater6" runat="server">
                                        <ItemTemplate>
                                            <tr onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className=''">
                                                <td onclick="Select('txtUltimateStyle','<%#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="txtUltimateStyleName" Text="选择样式" runat="server" CssClass="in1"
                                onclick="ShowDiv('4')" onmouseout="HiddenDiv('4')" Style="width: 320px;cursor:pointer"></asp:TextBox><asp:TextBox
                                    ID="txtUltimateStyleId" 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="txtUltimateDateRange" runat="server" CssClass="in1" Rows="30"
                    Text="0" Columns="10"></asp:TextBox>
                天的文章 0为显示所有文章
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                排序方式：
            </td>
            <td class="bqright" height="28">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td><%=D.BLL.B_Common.XiaLaOrder("XiaLaOrder")%></td>
                    </tr>
                    <tr>
                        <td><asp:TextBox ID="txtOrderName" Text="自动编号降序" runat="server" CssClass="in1"
                    onclick="ShowDiv('XiaLaOrder')" onmouseout="HiddenDiv('XiaLaOrder')" style="width:153px;cursor:pointer"></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">
                    <tr>
                        <td><%=D.BLL.B_Common.XiaLaFormatTime("FormatTime")%></td>
                    </tr>
                    <tr>
                        <td><asp:TextBox ID="txtFormatTimeName" Text="2009-06-19" runat="server" CssClass="in1" style="width:138px;cursor:pointer" onclick="ShowDiv('FormatTime')" onmouseout="HiddenDiv('FormatTime')"></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:TextBox ID="txtUltimateRowInsert" runat="server" Columns="10" CssClass="in1"></asp:TextBox>
                条后，向列表中插入<asp:TextBox ID="txtUltimateInsertHtml" runat="server" Columns="18" CssClass="in1"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft" height="28">
                分页设置：
            </td>
            <td class="bqright">
                <table cellpadding="2" cellspacing="0" border="0">
                    <tr>
                        <td>
                            每页显示数量：<asp:TextBox ID="txtPageSize" runat="server" CssClass="in1" Columns="5" Text="10"></asp:TextBox>条
                            显示页索引数目：<asp:TextBox ID="NumericText" runat="server" CssClass="in1" Columns="5" Text="10"></asp:TextBox>页
                        </td>
                    </tr>
                    <tr>
                        <td>
                            首 页文字：<asp:TextBox ID="FirstPageText" runat="server" CssClass="in1" Columns="10"
                                Text="首页"></asp:TextBox>
                            上一页文字：<asp:TextBox ID="PrevPageText" runat="server" CssClass="in1" Columns="10" Text="上一页"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            下一页文字：<asp:TextBox ID="NextPageText" runat="server" CssClass="in1" Columns="10" Text="下一页"></asp:TextBox>
                            尾 页文字：<asp:TextBox ID="LastPageText" runat="server" CssClass="in1" Columns="10" Text="尾页"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span style="float:left">系统分页效果：</span><asp:TextBox ID="txtCssName" runat="server" CssClass="in1" style="float:left" Columns="20" Text="viciao"></asp:TextBox>
                            <input id="Button7" type="button" value="选择分页效果" class="btn" style="float:left" onclick="WinOpenLhgDialog('选择分页样式','../common/SelectPageStyle.aspx?ControlId=txtCssName',500,300,'')" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            自定义分页效果：<asp:DropDownList ID="DropPager" runat="server">
                                <asp:ListItem Value="0">不使用</asp:ListItem>
                            </asp:DropDownList>
                            选择后，系统分页效果无效
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="bqright">
                <font color="red">注：通过模板管理编辑模板时,在分页位置处插入{D:Page}或右键菜单中选择【插入分页码】进行分页</font>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="40">
                <asp:Button ID="Button5" runat="server" Text=" 确认 " CssClass="btn radius30 pad_0_30" OnClick="Button5_Click" /><input id="Button6" type="button" value=" 取消 " onclick="frameElement.api.close();"
                    class="btn radius30 pad_0_30" style="margin-left: 20px" />
            </td>
        </tr>
    </table>
    </form>

    <script type="text/javascript">
        function selColumn(val, input, name) {
            switch (val) {
                case "0":
                    DianCMS_$("span" + name + "IsChildColumn").style.display = "none";
                    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>
