<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="Kindeditor" Namespace="kindeditor.Net" Assembly="kindeditor.Net" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Import Namespace="Hishop.SystemServices" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
    <script type="text/javascript" language="javascript">
        function showWin() {
                if (dialogAddCate.get_isShowing()) {
                    dialogAddCate.Close();
                }
                else {
                    dialogAddCate.Show();
                }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>           
            <div class="PageTitleArea">
                <div class="PageTitle">分类管理</div>
                <div style="width: 80%;">图库分类管理</div>
            </div>
            <div>
                <ul class="anchors clearfix">
                <li><a href='./ImageGallery.aspx'><img src="../images/bmquanxian.gif" alt="" />图库管理</a></li>
                <li><a href='./ImageUploader.aspx'><img src="../images/guoqidecuxiao.gif" alt="" />上传图片</a></li>
                <li class="tabs-selected"><a href='./ImageCategorys.aspx'><img src="../images/shiyoudecuxiao.gif" alt="" />分类管理</a></li>
                </ul>
            </div>
            <Hishop:ImageCategorys ID="ImageCategorys" runat="server">
                <SkinTemplate> 
                    <Hishop:StatusMessage ID="Status" runat="server" Visible="False" />
                    <div class="dataarea mainwidth clearfix">
                      <table width="100%" border="0" cellspacing="5" cellpadding="0">
                      <tr>
                        <td width="82%" valign="top" style="padding-right:5px;"><!--搜索-->
                                    <!--添加上传图片列表-->
                                    <div class="datalist">
                                  <UI:Grid ID="ImageTypeList" runat="server" AutoGenerateColumns="false" ShowHeader="true" DataKeyNames="CategoryId" GridLines="None" Width="100%" HeaderStyle-CssClass="addFileList">
                                  <Columns>
                                      <asp:TemplateField HeaderText="分类名称" ItemStyle-Width="30%">
                                            <ItemTemplate>
                                               <asp:TextBox ID="ImageTypeName" runat="server" Text='<%# Bind("CategoryName") %>' CssClass="forminput"></asp:TextBox>
                                            </ItemTemplate>
                                      </asp:TemplateField>
                                       <Hishop:SortImageColumn HeaderText="排序" ReadOnly="true" ItemStyle-Width="10%"/>
                                      <asp:TemplateField HeaderText="操作" HeaderStyle-Width="10%">
                                            <ItemTemplate>
                                                 <span class="submit_shanchu"><Hishop:ImageLinkButton runat="server" ID="lkbtnDelete" OnClientClick="return confirm('确定删除此分类吗？')" CommandName="Delete" IsShow="true" Text="删除" /></span>
                                            </ItemTemplate>
                                      </asp:TemplateField>
                                  </Columns>
                                </UI:Grid>
                                <table cellspacing="0" border="0" style="width: 100%; border-collapse: collapse;">
                                         <tr>
                                            <td colspan="4" style="padding-left:20px;padding-top:10px;">
                                            <asp:Button ID="ImageTypeEdit" runat="server" Text="确定修改"  CssClass="inp_L1" />
                                            <input type="button" value="添加分类" onclick="showWin()" class="inp_L1" />
                                        </tr>
                                    </tbody></table>                
                             </div>
                            <!--添加上传图片列表--></td>
                        <td valign="top">
                        <!--右边-->
                         <div class="imageDataRight">
                           <div class="borderthin">
                            <ul class="RightHead">图片分类:</ul>
                             <!--<ul class="pad10"><a href="/admin/store/AdvPositions.aspx?ThemName=default" class="submit_jia100" id="ctl00_contentHolder_hlinkSetAdv">添加分类</a></ul>-->
                             <div class="spliLine"></div>
                             <Hishop:ImageTypeLabel runat="server" ID="ImageTypeID" />
                            <ul class="pad10"><a href="<%= Globals.ApplicationPath%>/admin/shop/ImageCategorys.aspx" class="submit_type">分类管理</a></ul>
                          </div>
                          </div> 
                        </td>
                      </tr>
                    </table>
                    </div>	

                    <!--添加分类-->
        <UI:Dialog AnimationType="Live" ShowTransition="Fade" AnimationSlide="ExponentialDecelerate"
            CloseTransition="Fade" AnimationDuration="600" Modal="false"
            AllowDrag="true" Alignment="MiddleCentre" Title="添加图片分类"
            ID="dialogAddCate" runat="server" Width="450" X="200" Y="300" >
            <Content>
                      <table>
                      <tr><td>分类名称：</td><td><asp:TextBox name="AddImageTypeName" runat="server" Text='' CssClass="forminput" ID="AddImageTypeName" Width="250"></asp:TextBox></td></tr>
                      <tr><td colspan="2"><div id="AddImageTypeNameTip" runat="server"></div></td></tr>
                      <tr>
                      <td colspan="2">
                            <Hishop:ValidateTarget ID="validateTargetName" ContainerId="ValidatorContainer"
                                runat="server" ControlToValidate="AddImageTypeName" Description="长度限制在20个字符以内" Nullable="false" ValidateGroup="CateSet">
                                <Validators>
                                    <Hishop:InputStringClientValidator ErrorMessage="分类名称长度请在1到20个字符之间" LowerBound="1" UpperBound="20" />
                                </Validators>
                            </Hishop:ValidateTarget>
                       <asp:Button ID="btnSaveImageType" runat="server" OnClientClick="return PageIsValid('CateSet');" Text="确定添加"  CssClass="inp_L1" />
                      </td>
                      </tr>
                      </table>
            </Content>
        </UI:Dialog>
                </SkinTemplate>
            </Hishop:ImageCategorys>
        </div>
        <br />
        <div style="margin:0px auto;width:500px;clear:both;">
            <hr style="width:500px;" />
            <Hishop:SiteCopyright ID="SiteCopyright1" runat="server" />
        </div>
        <br />
        <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
    </form>
</body>
</html>