<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="manageASPAPP.aspx.cs" Inherits="Web.User.manageASPAPP" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>manageASPAPP</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/head.htm"-->
</head>
<body>
    <div class="main-content-inner">
        <form id="Form1" method="post" runat="server">
        <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa  fa-desktop"></i>
                        信息共享列表
                        </li>
                </ul>
                <div class="user-service pull-right">
                    <span data-original-title="帮助" data-placement="left" data-rel="popover" data-content="共享信息用于共享给其他站点引用显示" data-trigger="hover"><i class="fa fa-question-circle bigger-120 blue"></i></span>
                </div>
            </div>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="list-func-box func-box">
                            <div class="bd">
                                <div class="page-header clearfix">
                                    <div class="search-box pull-right">
                                    </div>
                                    <!--/search-box-->
                                    <div class="action-field">
                                    <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>
                                    &nbsp;
                                    <asp:Button ID="btnDel" class="btn btn-sm btn-primary" runat="server" Text="删 除" OnClick="Btn_Click"></asp:Button>
                                    </div>
                                    <!--/action-field-->
                                </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:DataGrid ID="newsGrid" class="table table-striped table-bordered table-hover" runat="server" AllowSorting="True" AutoGenerateColumns="False" OnItemCommand="newsGrid_ItemCommand">
                                        <Columns>
                                            <asp:TemplateColumn HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('newsGrid',this.checked)" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:BoundColumn DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"></asp:BoundColumn>
                                            <asp:TemplateColumn HeaderText="标题" HeaderStyle-CssClass="title">
                                                <ItemTemplate>
                                                    <span  data-placement="right" data-rel="popover" data-content="<%# DataBinder.Eval(Container, "DataItem.intactTitle") %>" data-trigger="hover">
                                                    <asp:HyperLink ID="intactTitle" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.intactTitle") %>' Target="_blank" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.pkId", "../newsInfoASPAPP.aspx?pkId={0}") %>'></asp:HyperLink>
                                                    </span>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="作者" HeaderStyle-CssClass="title">
                                                <ItemTemplate>
                                                    <span data-placement="right" data-rel="popover" data-content="发布IP：<%# Eval("updateIp").ToString() %>" data-trigger="hover"><%#Eval("Author") %></span>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="发布时间" HeaderStyle-CssClass="title">
                                                <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:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="固顶" HeaderStyle-CssClass="title">
                                                <ItemTemplate>
                                                    <asp:DropDownList ID="isTop" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.isTop") %>'>
                                                        <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                                        <asp:ListItem Value="1">固顶</asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="审核" HeaderStyle-CssClass="title">
                                                <ItemTemplate>
                                                    <asp:DropDownList ID="pass" runat="server" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.passed") %>'>
                                                        <asp:ListItem Value="0" Selected="True">待审</asp:ListItem>
                                                        <asp:ListItem Value="1">通过</asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="管理" HeaderStyle-CssClass="title">
                                                <ItemTemplate>
                                                    <div class="action-buttons">
                                                    <asp:LinkButton ID="edit" runat="server" 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:TemplateColumn>
                                        </Columns>
                                    </asp:DataGrid>
                                    <!--[if lte IE 7]></div><![endif]-->
                                </div>
                                <!--/function-bd-->
            </div>
            <div class="ft">
                <div class="pagination">
                    <asp:Label ID="showPage" runat="server"></asp:Label>
                </div>
            </div>
            </div>
            <!-- PAGE CONTENT ENDS -->
         </div>
                </div>
            </div>
            <!-- /.page-content -->
        </form>
    </div>
    <!--#include file="../Css/foot.htm"-->
       <script type="text/javascript">

           jQuery(function ($) {

               $("#btnSave").click(function () {
                   if (GridSelectCheck('newsGrid', true)) {
                       return true;
                   }
                   else {
                       return false;
                   }
               });

               $("#btnDel").click(function () {
                   return GridSelectCheck('newsGrid', true);
               });

           });


           //栏目移动确认小页面调用本方法 
           function CallMoveSubmit() {
               $("#btnMoveSave").click();
           }

           //选中背景特效
           $(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;
                       }
                   }

               })
               //排序输入框失去焦点时选中
               $('.priority').blur(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>
