<%@ 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">
    <title>manageMenuItem</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/adminCss.htm" -->

    <script type="text/javascript" language="javascript">
    
     jQuery(function($) {
      //栏目编辑
            $(".FBox").click(function(){
                return true ;
            }).fancybox({
                'width'		: 690,
				'height'	: 450,
				'hideOnOverlayClick': false,
				'type': 'iframe',
				'padding': '0'
			
            });
            //新增栏目
            $("#btnAdd").click(function() {
                    return true; 
                }).fancybox({
                'width'		: 690,
				'height'	: 510,
				'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'	: 550,
				'hideOnOverlayClick': false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'type': 'iframe',
				'padding': '0'
              });
            /*列表高度*/
              $('.function-bd').height($(window).innerHeight() - 60);

              $(window).resize(function () {
                  $('.function-bd').height($(window).innerHeight() - 60);
              });
     })
   
        //频道效果预览
    function effectPreview(pkId)
    {
        window.open("../index.aspx?pkId="+pkId);
    }
    </script>

</head>
<body>
    <div class="list-func-box func-box list">
        <form id="form1" runat="server" method="post">
        <asp:Panel ID="pnlBCAction" runat="server" Visible="false" CssClass="function-hd">
            <div class="action-field">
                <asp:Button ID="btnSavelist" runat="server" Text="列表保存" CssClass="btn" OnClick="Btn_Click"></asp:Button>&nbsp;
                <asp:Button ID="btnSelect" runat="server" Text="栏目选择" CssClass="btn"></asp:Button>&nbsp;
                <asp:Button ID="btnAdd" runat="server" Text="栏目添加" CssClass="btn" />&nbsp;
                <asp:Button ID="btnEffect" runat="server" Text="效果查看" CssClass="btn"></asp:Button>&nbsp;&nbsp;
                <asp:Label ID="lbts" runat="server" Text="" ForeColor="Red"></asp:Label>
            </div>
        </asp:Panel>
        <div  class="function-bd" style=" overflow: auto;">
        <asp:GridView ID="gvBigclass" class="list-table" 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:BoundField DataField="name" HeaderText="名称" HeaderStyle-CssClass="title">
                    <HeaderStyle CssClass="title"></HeaderStyle>
                </asp:BoundField>
                <%--<asp:BoundField DataField="remark" HeaderText="备注" HeaderStyle-CssClass="title">
                    <HeaderStyle CssClass="title"></HeaderStyle>
                </asp:BoundField>--%>
                <asp:TemplateField HeaderText="栏目位置" HeaderStyle-CssClass="title">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlPosition" runat="server" DataValueField="NumField" DataTextField="ItemField"
                            DataSource="<%# positionDv %>"  CssClass="drop-txt" Width="110">
                        </asp:DropDownList>
                    </ItemTemplate>
                    <HeaderStyle CssClass="title"></HeaderStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="导航" HeaderStyle-CssClass="title">
                    <ItemTemplate>
                        <asp:CheckBox ID="navigate" runat="server" Checked='<%# Eval("navigate").ToString() == "0" ? false : true %>' />
                    </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="drop-txt" 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="drop-txt" 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="drop-txt" 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="drop-txt" 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>
                        <a href='manageMenuEditor.aspx?pkId=<%# Eval("pkId") %>&menuMode=2' class="FBox" title="编辑"><i class="icon icon-pencil"></i></a>
                        <asp:LinkButton ID="del" runat="server" CommandName="del" CommandArgument='<%# Eval("name") %>'><i class="icon icon-remove" title="删除"></i></asp:LinkButton>
                        <asp:LinkButton ID="lbtnNews" runat="server" CssClass="FBox3" href='<%#Eval("bigclassId","UserInfoSearch.aspx?searchId={0}&t=2")%>' title="信息"><i class="icon icon-file"></i></asp:LinkButton>
                    </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>
        </form>
    </div>
</body>
</html>
