<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageMenuItem.aspx.cs" Inherits="Web.Wpdcc.ManageMenuItem" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head runat="server">
    <!--#include file = "../Css/head.htm" -->
</head>
<body>
    <div class="list-func-box func-box list">
        <form id="form1" runat="server" method="post">
            <div class="action-field">
                <asp:Panel ID="pnlBCAction" runat="server" Visible="false" CssClass="function-hd">
                    <div class="page-header clearfix">
                        <div class="action-field">
                            <asp:Button ID="btnSavelist" runat="server" Text="列表保存" CssClass="btn btn-sm btn-primary" OnClick="Btn_Click"></asp:Button>&nbsp;
                <asp:Button ID="btnSelect" runat="server" Text="栏目选择" CssClass="btn btn-sm btn-primary"></asp:Button>&nbsp;
                <asp:Button ID="btnAdd" runat="server" Text="栏目添加" CssClass="btn btn-sm btn-primary" />&nbsp;
                <asp:Button ID="btnEffect" runat="server" Text="效果查看" CssClass="btn btn-sm btn-primary"></asp:Button>&nbsp;&nbsp;
                <asp:Label ID="lbts" runat="server" Text="" ForeColor="Red"></asp:Label>
                        </div>
                        </div>
                </asp:Panel>
                <div class="function-bd" style="overflow-x:auto;">
                    <asp:GridView ID="gvBigclass" EmptyDataText="该频道下还未创建栏目" class="table table-striped table-bordered table-hover" runat="server" AutoGenerateColumns="False"
                        OnRowCommand="gvBigclass_RowCommand" DataKeyNames="pkId" Style="min-width: 910px;">
                        <Columns>
                            <asp:BoundField DataField="pkId" HeaderText="ID" HeaderStyle-CssClass="title">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="名称" HeaderStyle-CssClass="title">
                                <ItemTemplate>
                                    <span data-original-title="栏目类型" data-placement="right" data-rel="popover" data-content="<%# Eval("tpname").ToString() %>" data-trigger="hover"><%# Eval("name").ToString() %></span>
                                </ItemTemplate>
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="栏目位置" HeaderStyle-CssClass="title">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlPosition" runat="server" DataValueField="NumField" DataTextField="ItemField"
                                        DataSource="<%# positionDv %>" CssClass="input-md" Width="110">
                                    </asp:DropDownList>
                                </ItemTemplate>
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="导航" HeaderStyle-CssClass="title" ItemStyle-Width="55px">
                                <ItemTemplate>
                                    <label>
                                        <input id="navigate" runat="server" class="ace" type="checkbox" checked='<%# Eval("navigate").ToString() == "0" ? false : true %>'>
                                        <span class="lbl"></span>
                                    </label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="显示模式" HeaderStyle-CssClass="title" Visible="false">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlGate" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.gate") %>'>
                                        <asp:ListItem Value="0" Selected="True">无限制</asp:ListItem>
                                        <asp:ListItem Value="1">内网</asp:ListItem>
                                        <asp:ListItem Value="2">外网</asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="更多页模板" HeaderStyle-CssClass="title">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlMoreItem" runat="server" DataTextField="name" DataValueField="pkId" DataSource="<%# moreItemDv %>" CssClass="input-md" Width="160">
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="新闻页模板" HeaderStyle-CssClass="title">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlNewsInfoItem" runat="server" DataTextField="name" DataValueField="pkId" DataSource="<%# newsinfoDv %>" CssClass="input-md" Width="160">
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="栏目模板" HeaderStyle-CssClass="title">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlArtDesign" runat="server" DataTextField="name" DataValueField="pkId" DataSource="<%# artDesignDs %>" CssClass="input-md" Width="100">
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="grade" HeaderText="显示等级" HeaderStyle-CssClass="title"
                                Visible="false">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="显示根菜单中" HeaderStyle-CssClass="title" Visible="false">
                                <ItemTemplate>
                                    <asp:DropDownList ID="displayRoot" runat="server" CssClass="input-md" Width="45" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.displayRoot") %>'>
                                        <asp:ListItem Value="0">否</asp:ListItem>
                                        <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="执行" HeaderStyle-CssClass="title" ItemStyle-Width="130">
                                <ItemTemplate>
                                    <div class="action-buttons">
                                        <a href='manageMenuEditor.aspx?pkId=<%# Eval("pkId") %>&menuMode=2' data-toggle="tooltip" data-placement="bottom"  title="编辑" rel="index"><i class="ace-icon fa fa-pencil bigger-120 blue"></i></a>
                                        <asp:LinkButton ID="lbtnClass" runat="server" CssClass="FBox3" href='<%#Eval("bigclassId","menuApply.aspx?type=9&Id={0}")%>' data-toggle="tooltip" data-placement="bottom" title="频道引用"><i class="ace-icon fa fa-share-alt bigger-120 purple" ></i></asp:LinkButton>
                                        <asp:LinkButton ID="lbtnNews" runat="server" CssClass="FBox3" href='<%#Eval("bigclassId","UserInfoSearch.aspx?searchId={0}&t=2")%>' data-toggle="tooltip" data-placement="bottom" title="发文搜索"><i class="ace-icon fa fa-search-plus light-blue bigger-120" ></i></asp:LinkButton>
                                        <asp:LinkButton ID="del" runat="server" CommandName="del" CommandArgument='<%# Eval("name") %>' data-toggle="tooltip" data-placement="bottom"  title="删除" ><i class="ace-icon fa fa-trash-o bigger-120 red" ></i></asp:LinkButton>
                                    </div>
                                </ItemTemplate>
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:TemplateField>
                            <asp:BoundField DataField="itemId" HeaderText="position" HeaderStyle-CssClass="title"
                                Visible="False">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                            <asp:BoundField Visible="False" DataField="layoutTemplateId" HeaderText="layoutTemplateId"
                                HeaderStyle-CssClass="title">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                            <asp:BoundField Visible="False" DataField="address" HeaderText="address" HeaderStyle-CssClass="title">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                            <asp:BoundField Visible="False" DataField="newsTemplateId" HeaderText="newInfo" HeaderStyle-CssClass="title">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                            <asp:BoundField Visible="False" DataField="artDesignTemplateId" HeaderText="artDesignTemplateId"
                                HeaderStyle-CssClass="title">
                                <HeaderStyle CssClass="title"></HeaderStyle>
                            </asp:BoundField>
                        </Columns>
                    </asp:GridView>
                </div>
                </div>
        </form>
        <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
    </div>
    <!--#include file = "../Css/foot.htm" -->
     <script type="text/javascript">
         jQuery(function ($) {
             $('.table select').unbind();

             $('[data-rel=popover]').popover({ container: 'body' });
             //栏目编辑
             $("a[rel=index]").fancybox({
                 'width': 750,
                 'height': 450,
                 'hideOnOverlayClick': true,
                 'type': 'iframe',
                 'padding': 0,
                 'arrows': false
             });

             $("#btnAdd").click(function () {
                 return true;
             }).fancybox({
                 'width': 690,
                 'height': 620,
                 'hideOnOverlayClick': false,
                 'type': 'iframe',
                 'href': 'bigClassEdit.aspx?pkId=0&menuId=<%=parentId%>',
                 'padding': '0'
             });
             //栏目选择
             $("#btnSelect").click(function () {
                 return true;
             }).fancybox({
                 'width': 520,
                 'height': 470,
                 'hideOnOverlayClick': false,
                 'type': 'iframe',
                 'href': 'selectItem.aspx?parentId=<%= parentId %>&mode=1',
                'padding': '0'
            });
             //信息
             $(".FBox3").click().fancybox({
                 'width': 700,
                 'height': 635,
                 'hideOnOverlayClick': false,
                 'transitionIn': 'elastic',
                 'transitionOut': 'elastic',
                 'type': 'iframe',
                 'padding': '0'
             });
         })



        //频道效果预览
        function effectPreview(pkId) {
            window.open("../" + pkId);
        }
    </script>
</body>
</html>
