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

<%@ Register Src="~/Module/pageNavi.ascx" TagPrefix="uc1" TagName="pageNavi" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>manage contribute</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/head.htm"-->
</head>
<body>
    <form method="post" runat="server">
        <div class="list-func-box func-box">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa  fa-desktop"></i>
                        <asp:Label ID="lbpageNav" runat="server" Text=""></asp:Label>
                    </li>
                </ul>
            </div>
            <div class="page-content">
                <!-- PAGE CONTENT BEGINS -->
                <div class="page-header clearfix">
                    <div class="pull-left">
                        <asp:Button ID="btnSave" class="btn btn-sm btn-primary" runat="server" Text="保 存" OnClick="Btn_Click"></asp:Button>
                        &nbsp;
                    <asp:Button ID="btnAdd" class="btn btn-sm btn-primary" runat="server" Text="添 加" OnClick="Btn_Click"></asp:Button>
                        <%--<asp:Button ID="AuditMore" class="btn" runat="server" Text="批量审核" />--%>
                    &emsp;
                    <asp:HyperLink ID="AuditMore" runat="server" Target="_blank" CssClass="blue">批量审核</asp:HyperLink>&nbsp;
                        <asp:Label ID="lbTip" runat="server" ForeColor="Red" Text=""></asp:Label>
                    </div>
                    <div class="pull-right">
                        状态查看：<asp:DropDownList ID="ddlState" runat="server" CssClass="input-md" AutoPostBack="True" OnSelectedIndexChanged="ddlState_SelectedIndexChanged"></asp:DropDownList>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <!--[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" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" EmptyDataText="暂无数据…"
                            AllowSorting="True" OnSorting="GridView1_Sorting" AutoGenerateColumns="False" class="table table-striped table-bordered table-hover table-sorting">
                            <Columns>
                                <asp:BoundField DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
                                <asp:TemplateField HeaderText="标题" HeaderStyle-CssClass="title" SortExpression="intactTitle">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="intactTitle" runat="server" Text='<%# Eval("intactTitle") %>'
                                            Target="_blank" NavigateUrl='<%# Eval( "pkId", "../ShwContribute.aspx?pkId={0}") %>'> 
                                        </asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="userName" HeaderText="发布人账号" HeaderStyle-CssClass="title" SortExpression="fullName" />
                                <asp:TemplateField HeaderText="发布人昵称" HeaderStyle-CssClass="title" SortExpression="updateTime">
                                    <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="发布时间" HeaderStyle-CssClass="title" 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}") %>'></asp:Label>
                                        </span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="审核状态" HeaderStyle-CssClass="title" SortExpression="state">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="state" runat="server" Visible="False">
                                        </asp:DropDownList>
                                        <asp:Label ID="LabelState" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="投稿栏目" HeaderStyle-CssClass="title">
                                    <ItemTemplate>
                                        <asp:Label ID="lbBCName" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                                    <ItemTemplate>
                                        <div class="action-buttons">
                                            <asp:LinkButton ID="edit" runat="server" CommandName="edit" data-toggle="tooltip" data-placement="bottom" title="编辑" CommandArgument='<%# Eval("pkId") %>'><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:LinkButton>
                                            <asp:LinkButton ID="audit" CssClass="FBox3" runat="server" CommandName="audit" data-toggle="tooltip" data-placement="bottom" title="审核" CommandArgument='<%# Eval("pkId") %>'><i class="ace-icon glyphicon glyphicon-ok bigger-120 blue"></i></asp:LinkButton>
                                            <asp:LinkButton ID="contribute" runat="server" CommandName="contribute" data-toggle="tooltip" data-placement="bottom" title="投稿" CommandArgument='<%# Eval("pkId") %>'><i class="ace-icon glyphicon glyphicon-envelope bigger-120 pink" ></i></asp:LinkButton>
                                            <asp:LinkButton ID="view" runat="server" CommandName="view" data-toggle="tooltip" data-placement="bottom" title="查看批注"><i class="ace-icon fa fa-pencil-square-o bigger-120 green" ></i></asp:LinkButton>
                                            <asp:CheckBox ID="del" runat="server" Text="删除"></asp:CheckBox>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <%--                                <asp:BoundField DataField="state" HeaderText="状态" Visible="False" HeaderStyle-CssClass="title" />
                                <asp:BoundField DataField="contributeId" HeaderText="" Visible="False" />--%>
                            </Columns>
                        </asp:GridView>
                        <!--[if lte IE 7]></div><![endif]-->
                    </div>
                </div>
                <!--/bd-->
                <div class="grid-pager">
                    <uc1:pageNavi runat="server" ID="pageNavi" dataCtlName="GridView1" />
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div>
        </div>
    </form>
    <!--#include file="../Css/foot.htm"-->
    <script type="text/javascript">
        jQuery(function ($) {

            $("#save").click(function () {
                return confirm("您确定要继续执行本次操作吗？");
                return GridSelectCheck('GridView1', true);
            });

        });

    </script>
    <script language="javascript" type="text/javascript">
        function openViewWin(flag) {
            //window.open("viewAuditRemark.aspx?pkId="+flag +"","查看审核批注","scrollbars=yes,width=300,height=190");
            $.fancybox({
                'width': 400,
                'height': 200,
                'hideOnOverlayClick': false,
                'transitionIn': 'elastic',
                'transitionOut': 'fade',
                'type': 'iframe',
                'padding': '0',
                'href': 'viewAuditRemark.aspx?pkId=' + flag
            });
        }

        function openCheckAllWin(bigClassId, menuId) {
            //window.open("auditMore.aspx?bigClassId="+bigClassId +"&menuId="+menuId+"","批量审核","scrollbars=yes,width=900,height=500");
            var url = "auditMore.aspx?bigClassId=" + bigClassId + "&menuId=" + menuId;

            var a = $("<a href='" + url + "' target='_blank'>Apple</a>").get(0);
            var e = document.createEvent('MouseEvents');
            e.initEvent('click', true, true);
            a.dispatchEvent(e);
            console.log('event has been changed');
        }
    </script>
</body>
</html>
