<%@ Page Language="c#" Inherits="Web.User.manageWebResearOptions" CodeBehind="manageWebResearOptions.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>问卷选项管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/head.htm"-->
</head>
<body>
    <form id="newsMange" method="post" runat="server">
        <div class="list-func-box func-box">
            <div class="hd">
                <div class="breadcrumb">
                    <asp:Label ID="lbpageNav" runat="server" Text=""></asp:Label>
                </div>
                <!--/breadcrumb-->
            </div>
            <div class="page-content">
                <div class="function-hd">
                    <div class="action-field">
                        <asp:Button ID="BackToQuestion" class="btn btn-sm btn-primary" runat="server" OnClick="BackToQuestion_Click" Text="返 回" CausesValidation="False" />&nbsp;&nbsp;
                    <input type="button" value="添 加" class="add btn btn-sm btn-primary" id="btnAdd" runat="server" />
                    </div>
                    <!--/action-field-->
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
                        <asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" EmptyDataText="暂无数据…"
                            AutoGenerateColumns="False" class="table table-striped table-bordered table-hover table-sorting">
                            <Columns>
                                <asp:BoundField DataField="pkId" HeaderText="选项ID号" HeaderStyle-CssClass="title" />
                                <asp:BoundField DataField="txtName" HeaderText="选项名称" HeaderStyle-CssClass="title" />
                                <asp:BoundField DataField="counter" HeaderText="投票数" HeaderStyle-CssClass="title" />
                                <asp:TemplateField HeaderText="允许用户填写信息" HeaderStyle-CssClass="title" >
                                    <ItemTemplate>
                                        <asp:Label ID="IsTextBox" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="是否为图片" HeaderStyle-CssClass="title" >
                                    <ItemTemplate>
                                        <asp:Label ID="isPic" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="选项" Visible="false" >
                                    <ItemTemplate>
                                        <asp:Label ID="optionsName" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <%--<asp:BoundField DataField="IsTextBox" HeaderText="允许用户填写信息" HeaderStyle-CssClass="title" />--%>
                                <%--<asp:BoundField DataField="isPic" HeaderText="是否为图片" HeaderStyle-CssClass="title" />--%>
                                <%--<asp:BoundField DataField="optionsName" HeaderText="选项" Visible="false" />--%>
                                <asp:TemplateField HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                                    <ItemTemplate>
                                        <div class="action-buttons">
                                            <asp:HyperLink ID="edit" runat="server" CssClass="FBox" data-toggle="tooltip" data-placement="bottom" title="编辑" Visible="false"><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:HyperLink>
                                            <asp:LinkButton ID="edit1" runat="server" data-toggle="tooltip" data-placement="bottom" title="很抱歉，您没有权限编辑" Visible="false" Enabled="false"><i class="ace-icon fa fa-pencil bigger-120 grey"></i></asp:LinkButton>
                                            <asp:LinkButton ID="del" runat="server" CommandName="del" Visible="false" CausesValidation="False" OnClientClick="return confirm('确定要删除本选项吗？');" data-toggle="tooltip" data-placement="bottom" title="删除" CommandArgument='<%# Eval("pkId")+"&"+Eval("optionsName") %>'><i class="ace-icon fa fa-trash-o bigger-120 red" ></i></asp:LinkButton>
                                            <asp:LinkButton ID="del1" runat="server" data-toggle="tooltip" data-placement="bottom" title="很抱歉，您没有权限删除" Visible="false" Enabled="false"><i class="ace-icon fa fa-trash bigger-120 grey"></i></asp:LinkButton>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <div class="grid-pager">
                            <uc1:pageNavi runat="server" id="pageNavi" dataCtlName="GridView1" />
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </form>
    <!--#include file="../Css/foot.htm"-->
    <script type="text/javascript">

        jQuery(function ($) {

            $("#btnAdd").click(function () {
                return true;
            }).fancybox({
                'type': 'iframe',
                'width': 700,
                'height': 270,
                autoSize: false,
                'hideOnOverlayClick': false,
                'href': 'addWebResearOption.aspx?questionId=<%= questionId %>&menuId=<%= menuId %>&researId=<%= researId %>&bigClassPkId=<%= bigClassPkId %>&type=<%= type %>&currentpage=<%= pageNavi.currentPage %>',
                'padding': '0'
            });

            $(".FBox").click().fancybox({
                'width': 700,
                'height': 270,
                autoSize: false,
                'hideOnOverlayClick': false,
                'transitionIn': 'elastic',
                'transitionOut': 'fade',
                'type': 'iframe',
                'padding': '0'
            });

        });

    </script>
</body>
</html>
