<%@ Page Language="c#" Inherits="Web.Wpdcc.bigClass" CodeBehind="bigClass.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>bigClass</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/head.htm" -->
</head>
<body>
    <div class="main-content-inner">
        <!-- #section:basics/content.breadcrumbs -->
        <div class="breadcrumbs" id="breadcrumbs">
            <script type="text/javascript">
                try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
            </script>
            <ul class="breadcrumb">
                <li>
                    <i class="ace-icon fa  fa-desktop"></i>
                    <a href="welcome.aspx">主页</a>
                </li>
                <li>栏目管理
                </li>
            </ul>
            <a href="manageMenuTree.aspx" class="btn btn-primary btn-xs pull-right" style="margin: 5px 15px 0 0;">
                <i class="ace-icon glyphicon glyphicon-refresh align-top bigger-125"></i>
                返回布局管理</a>
            <!-- /.breadcrumb -->

            <!-- /section:basics/content.searchbox -->
        </div>
        <!-- /section:basics/content.breadcrumbs -->

        <div class="page-content">
            <asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager>
            <form id="userManage" method="post" runat="server">
                <div class="page-header">

                    <asp:UpdatePanel ID="upd1" runat="server" ChildrenAsTriggers="true" RenderMode="Inline">
                        <ContentTemplate>
                            栏目类别：<asp:DropDownList ID="ddlTemplateType" runat="server" CssClass="input-md" DataTextField="type"
                                DataValueField="pkId" AutoPostBack="true" OnSelectedIndexChanged="ddlTemplateType_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlTemplate" runat="server" DataTextField="name" DataValueField="pkId" CssClass="input-md">
                            </asp:DropDownList>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    ,
                    <asp:DropDownList ID="ddlremark" runat="server" CssClass="input-md" Style="width: 80px">
                        <asp:ListItem Text="栏目名" Value="1"></asp:ListItem>
                        <asp:ListItem Text="说明" Value="2"></asp:ListItem>
                    </asp:DropDownList>：
                    <asp:TextBox ID="tbremark" runat="server" CssClass="input-txt" Width="100"></asp:TextBox>
                    &nbsp;<asp:Button ID="btnFilter" class="btn btn-sm btn-primary" runat="server" Text="搜索栏目" OnClick="Btn_Click" />
                    &nbsp;
                            <label>
                                <input runat="server" id="ckbSelect" name="form-field-checkbox" checked="checked" class="ace" type="checkbox">
                                <span class="lbl">只显示‘孤立’栏目</span>
                            </label>
                    &nbsp;
                            <asp:Button ID="btnAdd2" class="btn btn-sm btn-primary" runat="server" Text="添加栏目" />
                    &nbsp;
                            <asp:Button ID="btnDel" runat="server" class="btn btn-sm btn-primary" Text="删 除" OnClick="del_Click" Visible="false"></asp:Button>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:UpdatePanel ID="upd2" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:HiddenField ID="hfidstr" runat="server" />
                                <asp:HiddenField ID="hftitlestr" runat="server" />
                                <asp:GridView  ID="GridView1" runat="server" EmptyDataText="相关栏目不存在" AutoGenerateColumns="False"  class="table table-striped table-bordered table-hover"
                                     OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" >
                                    <Columns>
                                        <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                            <HeaderTemplate>
                                                <label>
                                                    <asp:CheckBox ID="cbAll" Class="ace" Text=" " runat="server" onclick="GridSelectAll('GridView1',this.checked)" />
                                                    <span class="lbl"></span>
                                                </label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField Visible="true" DataField="pkId" HeaderText="ID" HeaderStyle-CssClass="title"></asp:BoundField>
                                        <asp:BoundField DataField="name" HeaderText="栏目名" HeaderStyle-CssClass="title"></asp:BoundField>
                                        <asp:BoundField DataField="remark" HeaderText="说明" HeaderStyle-CssClass="title"></asp:BoundField>
                                        <asp:TemplateField HeaderText="栏目类别" HeaderStyle-CssClass="title">
                                            <ItemTemplate>
                                                <asp:Label ID="lblTemplate" runat="server" Text='<%# "【" + Eval("type") + "】 " + Eval("template") %>'>
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="adminName" HeaderText="管理员" HeaderStyle-CssClass="title"></asp:BoundField>
                                        <asp:BoundField DataField="updateTime" HeaderText="更新时间" HeaderStyle-CssClass="title"></asp:BoundField>
                                        <asp:TemplateField HeaderText="系统模板" HeaderStyle-CssClass="title">
                                            <ItemTemplate>
                                                <asp:Label ID="isSystemItem" runat="server" Text='<%# Eval("isSystemItem").ToString() == "1" ? "是" : "否" %>'>
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField  HeaderText="操作" HeaderStyle-CssClass="title" ItemStyle-Width="230">
                                            <ItemTemplate>
                                                <div class="action-buttons">
                                                    <asp:LinkButton ID="lkbEdit" runat="server" CommandName="edit" CausesValidation="False" CssClass="FBox" data-toggle="tooltip" data-placement="bottom" title="编辑" href='<%# Eval("pkId","bigClassEdit.aspx?pkId={0}")%>'><i class="icon icon-pencil bigger-120 blue"></i></asp:LinkButton>
                                                    <asp:LinkButton ID="lbtnClass" runat="server" CssClass="FBox" href='<%#Eval("pkId","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="FBox" href='<%#Eval("pkId","UserInfoSearch.aspx?searchId={0}&t=2")%>' data-toggle="tooltip" data-placement="bottom" title="信息"><i class="ace-icon fa fa-search-plus bigger-120 light-blue"></i></asp:LinkButton>
                                                    <asp:HyperLink ID="hyRss" NavigateUrl='<%#"../Wpet/Rss.aspx?id=" + Eval("pkId") %>' runat="server" Text="RSS" Target="_blank"></asp:HyperLink>
                                                    <asp:LinkButton ID="lkbDel" runat="server" CommandName="del" CommandArgument='<%# Eval("pkId") %>' CausesValidation="False" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="ace-icon fa fa-trash-o bigger-120 red"></i></asp:LinkButton>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="adminId" HeaderText="adminId" Visible="False" HeaderStyle-CssClass="title"></asp:BoundField>
                                        <asp:BoundField DataField="code" HeaderText="code" Visible="False" HeaderStyle-CssClass="title"></asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnFilter" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                </div>
                <!--row-->
                <div class="clearfix">
                    <div class="col-xs-12">
                        列表中栏目数：<asp:Label ID="lb_totalItem" runat="server" ForeColor="Red"></asp:Label>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--#include file = "../Css/foot.htm" -->
     <script type="text/javascript">
         jQuery(function ($) {

             //新增栏目
             $("#btnAdd2").click(function () {
                 return true;
             }).fancybox({
                 'width': 700,
                 'height': 520,
                 'hideOnOverlayClick': false,
                 'type': 'iframe',
                 'padding': '0',
                 'href': 'bigClassEdit.aspx?pkId=0'
             });
             //编辑栏目CSS文件
             $("#btnOpenCSS").click(function () {
                 return true;
             }).fancybox({
                 'width': 746,
                 'height': 640,
                 'hideOnOverlayClick': false,
                 'type': 'iframe',
                 'padding': '0',
                 'href': 'editCss.aspx'
             });
             $("#btnDel").click(function () {
                 //return confirm("您确定要保存列表吗？");
                 return GridSelectCheck('GridView1', true);
             });

             //公用弹出层参数
             $(".FBox").click().fancybox({
                 'width': 700,
                 'height': 520,
                 'hideOnOverlayClick': false,
                 'type': 'iframe',
                 'padding': '0'
             });

         });
    </script>
</body>
</html>

