<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true"
    Codebehind="MenuList.aspx.cs" Inherits="PPFOR.Admin.DesignCenter.Menu.MenuList"
    Title="栏目列表" %>
<%@ Register Src="~/Admin/Ascx/Publisher.ascx" TagName="Publisher" TagPrefix="publish" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
<script src="../../JS/gridview.js" type="text/javascript"></script>  
<form id="form1" action="MenuList.aspx" method="post" runat="server">
    <div class="table-ppfor">
		<i></i><u></u>
		<ul>
		  <li><asp:Label ID="PPFOR_goForAddMenu" runat="server" ></asp:Label><input type="button" class="blueinput" value="生成静态页" onclick="return showDiv('生成静态页',400,150);" /></li>
			<li class="right">
				操作对象：<asp:DropDownList ID="PPFOR_languageList" runat="server" OnSelectedIndexChanged="PPFOR_languageListChanged" AutoPostBack="true" Width="86px" AppendDataBoundItems="true" >
            <asp:ListItem Value="0" >所有语言</asp:ListItem>
            </asp:DropDownList>
			</li>
		</ul>
	</div>       
    <asp:GridView ID="PPFOR_showMenuList" runat="server" CssClass="forgridview" OnRowDeleting="PPFOR_showMenuList_RowDeleting" OnRowDataBound="PPFOR_gridViewRowDataBound" AllowPaging="false" AutoGenerateColumns="False"  DataKeyNames="ID"  Width="100%" CellPadding="0" BackColor="White" BorderWidth="0" EmptyDataText="还没有添加栏目">
           <Columns>                
             <asp:TemplateField ShowHeader="False" HeaderText="" HeaderStyle-HorizontalAlign="Center">
                 <ItemStyle Wrap="False" HorizontalAlign="Center" />
                 <HeaderTemplate>
                     <asp:CheckBox ID="PPFOR_selectMenu" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectMenu" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="ID" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="栏目名称" DataField="menuName" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="所属语言" DataField="belongLanguage" HeaderStyle-Font-Bold="false"/> 
             <asp:BoundField HeaderText="所属模块" DataField="belongModel" HeaderStyle-Font-Bold="false"/>
             <asp:TemplateField HeaderText="在新窗口中打开" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_menuOpenNew" runat="server" Text='<%#Eval("openNew") %>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>           
             <asp:TemplateField HeaderText="显示" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_menuShow" runat="server" Text='<%#Eval("show") %>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="排列顺序" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                <asp:TextBox ID="PPFOR_menuSort" runat="server" Text='<%#Eval("sort") %>' Width="50" MaxLength="4"></asp:TextBox>                    
                </ItemTemplate>
             </asp:TemplateField>             
             <asp:TemplateField HeaderText="操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                <asp:HyperLink runat="server" ID="PPFOR_browseMenuHTML" ToolTip="浏览生成的静态文件" Text="浏览" Target="_blank" NavigateUrl='<%#Eval("htmlName") %>'></asp:HyperLink> | 
                <a href='MenuEdit.aspx?lan=<%# PPFOR_languageId %>&id=<%#Eval("ID") %>'>修改</a> | 
                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandName="Delete"
                    Text="删除" OnClientClick="return confirm('删除栏目将同时删除栏目所有相关数据,确认要删除吗？');"></asp:LinkButton>
                </ItemTemplate>
             </asp:TemplateField>
            </Columns>
             <FooterStyle BackColor="#990000" ForeColor="White" /> 
             <RowStyle Wrap="False" HorizontalAlign="Center" Font-Bold="false" BackColor="#ffffff"/> 
             <HeaderStyle HorizontalAlign="Center" BackColor="#F5F5F5" Font-Bold="false" ForeColor="#000000" />
             <AlternatingRowStyle BackColor="#F5F5F5" />
        </asp:GridView>
      <br />
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none;">
        <tr>
          <td>
              <asp:Button ID="PPFOR_updateMenuBatch" CssClass="inputbutton" runat="server" Text="全部更新" OnClick="PPFOR_updateMenuBatchClick"/>
              <asp:Button ID="PPFOR_deleteMenuBatch" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteMenuBatchClick" />
              <input name="reset" type="reset" id="reset1" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" onclick="SelectAllRows('<%=form1.ClientID%>',false)"/>
                <script type="text/javascript">
                    if("<%=PPFOR_displayRecordOption %>"!='none'){
                        addButtonArray("<%= PPFOR_updateMenuBatch.ClientID %>","<%= PPFOR_deleteMenuBatch.ClientID %>","reset1");
                    }
                </script> 
        </td>
        </tr>
      </table>
      <br />
      <publish:Publisher ID="PPFOR_doMenuPublish" runat="server" TextForPublishButton="发布栏目" TextForPublishSeleted="仅发布被勾选的栏目" TextForPublishAll="发布所有栏目" TextForDisplayPublishModel="同时发布栏目所属模块" />     
</form>        
</asp:Content>
