<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="myDraft.aspx.cs" Inherits="Web.User.myDraft" %>
<%@ Register Src="~/Module/pageNavi.ascx" TagPrefix="uc1" TagName="pageNavi" %>
<%@ Register Src="~/User/AuditingNav.ascx" TagPrefix="uc1" TagName="AuditingNav" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>我的草稿</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/head.htm" -->
</head>
<body>
    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <form id="Form1" method="post" runat="server">
                    <div class="list-func-box func-box">
                        <div class="tabbable">
                            <uc1:AuditingNav runat="server" id="AuditingNav" />
                        </div>
                    <%--<div class="tabbable">
                        <ul class="inbox-tabs nav nav-tabs tab-size-bigger tab-space-1" id="inbox-tabs">
                            <!-- #section:pages/inbox.compose-btn -->
                            <li>
                                <a href="managemain.aspx" data-toggle="tab" data-target="write">
                                    <i class="pink ace-icon fa fa-tags bigger-130"></i>
                                    <span class="bigger-110">待审信息
                                        <span class="badge badge-danger" id="addred" runat="server"><%= add %></span>
                                    </span>
                                </a>
                            </li>

                            <li>
                                <a href="infoSearch.aspx" data-toggle="tab" data-target="write">
                                    <i class="pink ace-icon fa fa-envelope bigger-130"></i>
                                    <span class="bigger-110">我的发布</span>
                                </a>
                            </li>
                            <!-- /.li-new-mail -->

                            <!-- /section:pages/inbox.compose-btn -->
                            <li class="active">
                                <a href="myDraft.aspx" data-toggle="tab" data-target="inbox">
                                    <i class="blue ace-icon fa fa-inbox bigger-130"></i>
                                    <span class="bigger-110">我的草稿</span>
                                </a>
                            </li>

                            <li>
                                <a href="search.aspx" data-toggle="tab" data-target="sent">
                                    <i class="orange ace-icon fa fa-location-arrow bigger-130"></i>
                                    <span class="bigger-110">站内搜索</span>
                                </a>
                            </li>
                        </ul>
                    </div>--%>
                    <div class="bd tab-content">
                        <div class="page-header clearfix">
                            <div class="action-field col-xs-6">
                                <asp:Button ID="btnDel" runat="server" class="btn btn-sm btn-primary" Text="删 除" OnClick="btnDel_Click"></asp:Button>
                            </div>
                        </div>
                        <div class="function-bd">
                            <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
                            <asp:HiddenField ID="hfidstr" runat="server" />
                            <asp:HiddenField ID="hftitlestr" runat="server" />
                            <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" class="table table-striped table-bordered table-hover table-sorting" 
                                    OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" EmptyDataText="暂无数据..." OnSorting="GridView1_Sorting">
                                <Columns>
                                    <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('GridView1',this.checked)" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"></asp:BoundField>
                                    <asp:TemplateField HeaderText="标题" SortExpression="intactTitle">
                                        <ItemTemplate>
                                            <asp:Label ID="D" Visible="false" runat="server" Text="[抄]" ForeColor="Red"></asp:Label>
                                            <asp:Label ID="L" Visible="false" runat="server" Text="[链]" ForeColor="Red"></asp:Label>
                                            <span data-placement="right" data-rel="popover" data-content="<%# Eval("intactTitle") %>" data-trigger="hover">
                                                <asp:HyperLink ID="intactTitle" runat="server" Text='<%# Eval("intactTitle") %>'
                                                    Target="_blank" NavigateUrl='<%# Eval("pkId", "../newsInfo.aspx?pkId={0}") %>'>
                                                </asp:HyperLink>
                                            </span>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="所属栏目" SortExpression="menuName">
                                        <ItemTemplate>
                                            <asp:Label ID="menuLabel" runat="server" Text='<%# Eval("menuName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="发布人" SortExpression="fullName">
                                        <ItemTemplate>
                                            <span  data-placement="right" data-rel="popover" data-content="<%# "发布IP："+Eval("updateIp") %>" data-trigger="hover"><%# Eval("fullName") %></span>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="发布时间" ItemStyle-Width="100px" SortExpression="updateTime">
                                        <ItemTemplate>
                                            <span data-placement="right" data-rel="popover" data-content="<%# Eval("updateTime") %>" data-trigger="hover"> 
                                                <asp:Label ID="lbtime" runat="server" Text='<%# Eval("updateTime", "{0:yyyy-M-d}") %>' ToolTip='<%# Eval("updateTime") %>'></asp:Label></span>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                                        <ItemTemplate>
                                                <div class="action-buttons">
                                                    <asp:LinkButton ID="edit" runat="server" CommandArgument='<%#Eval("pkId") +"&"+Eval("Code")+"&"+Eval("bigClassId")+"&"+Eval("sourceMenuId") %>' CommandName="edit" data-toggle="tooltip" data-placement="bottom" title="编辑"><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:LinkButton>
                                                </div>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <%--<asp:BoundField Visible="False" DataField="grade" HeaderText="等级" HeaderStyle-CssClass="title"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="useListTitle" HeaderText="useListTitle"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="listTitle" HeaderText="listTitle"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="Code" HeaderText="TemplateCode"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="bigClassId" HeaderText="bigClassId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="sourceMenuId" HeaderText="menuId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="isDuplicated" HeaderText="isDuplicated"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="duplicatedPkId" HeaderText="duplicatedPkId"></asp:BoundField>--%>
                                </Columns>
                            </asp:GridView>
                            <div class="grid-pager">
                                <uc1:pageNavi runat="server" id="pageNavi" dataCtlName="GridView1" />
                            </div>
                        </div>
                        <!--/function-bd-->
                    </div>
                         </div>
                </form>
                <!--/bd-->
            </div>
        </div>
    </div>
    <!--#include file = "../Css/foot.htm" -->
    <script language="javascript" type="text/javascript">
        //防止用户恶意保存
        jQuery(function ($) {

            $("#btnDel").click(function () {
                //return confirm("您确定要保存列表吗？");
                return GridSelectCheck('GridView1', true);
            });
            //设置“我的草稿”的样式为选中效果。
            document.getElementById("myDraft").className = "active";
        });

        //选中背景特效
        $(function () {
            $('.text-center input').click(function () {
                $(this).parents('tr').toggleClass('active');
            })
            $('.title.text-center input').click(function () {

                if ($('.list-table tr:first').hasClass('active')) {
                    $('.list-table tr').addClass('active');
                } else {
                    $('.list-table tr').removeClass('active');
                }
            })
            $('.list-table select').change(function () {
                //背景选中
                if ($(this).parents('tr').hasClass('active')) {

                } else {
                    $(this).parents('tr').toggleClass('active');
                }

                //复选框选中
                var checkbox = $(this).parents("tr").find("input");
                for (var i = 0; i < checkbox.length; i++) {
                    if (checkbox[i].type == 'checkbox') {
                        checkbox[i].checked = true;
                    }
                }
            })
        })
    </script>
</body>
</html>