<%@ Page Language="C#" MasterPageFile="../BloggerAdmin.master" AutoEventWireup="true" CodeBehind="PhotoManage.aspx.cs" Inherits="Y10.WebSite.Blog.Blogger.Admin.Album.PhotoManage" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phHead" runat="server">
<link href="<%=AppUrl %>/Blogger/Admin/Album/Images/Style/Album.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMainAdmin" runat="server">
<form id="MainForm" runat="server">
<!--Ajax脚本管理器-->
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<!--修改Ajax的initialAction-->
<script type="text/javascript">
Sys.Application.add_load(function()
{
    var form = Sys.WebForms.PageRequestManager.getInstance()._form;
    var href = window.location.href;
    form._initialAction = form.action = href;
});
</script>
<!--Ajax进度显示器-->
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<div style="border: 1px solid #DCBE6E;background: #FFFFBF;padding: 5px; position:absolute; left:5px; bottom:5px;">任务处理中,请稍候...</div>
</ProgressTemplate>
</asp:UpdateProgress>

<div id="ContentTitle"><%=MyTitle %></div>
<div id="ContentBody">

    <div id="AlbumAllPage_Nav" class="BrokenLineBox">
    <div class="LeftFloatBox"><a href="AlbumManage.aspx">我的相册</a> \ <a href="PhotoManage.aspx?AlbumID=<%=AlbumData.ID %>"><%=AlbumData.Title %></a></div>
    <div class="RightFloatBox">
    </div>
    </div>
    
    <div class="FullWidthBox">
    <input type="button" onclick="location='Shoot<%=ExtensionName %>?AlbumID=<%=AlbumData.ID %>'" value="拍摄相片" class="LinkButton" />
    <input type="button" onclick="location='PhotoAdd<%=ExtensionName %>?AlbumID=<%=AlbumData.ID %>'" value="上传相片" class="LinkButton" />
    <input type="button" onclick="location='AlbumEdit<%=ExtensionName %>?AlbumID=<%=AlbumData.ID %>'" value="编辑相册属性" class="LinkButton" />
    </div>

    <asp:UpdatePanel ID="PhotoListUpdatePanel" runat="server">
    <ContentTemplate>
    
    <div id="PhotoListTopPager" class="FullWidthBox">
    <webdiyer:AspNetPager ID="TopPager" runat="server" OnPageChanged="TopPager_PageChanged" AlwaysShow="True" UrlPaging="False" />
    </div>
    
    <ul id="PhotoList">
    <asp:Repeater ID="rpPhoto" runat="server" OnItemCreated="rpPhoto_ItemCreated" OnItemCommand="rpPhoto_UpdateCommand">
    <ItemTemplate>
    <li class="PhotoItem">
    <div class="PhotoItem_Top"><asp:Label ID="lbPhotoID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID")%>' Visible="false"></asp:Label></div>
    <div class="PhotoItem_Body">
    <div class="PhotoItem_Title">
        <div class="ViewEditPanelBox">
        <div class="ViewEditPanel_onmouseout" onmouseover="this.className='ViewEditPanel_onmouseover';" onmouseout="this.className='ViewEditPanel_onmouseout';">
            <div id="Title_View_<%# DataBinder.Eval(Container, "ItemIndex") %>" class="ViewPanel" onclick="Hide('Title_View_<%# DataBinder.Eval(Container, "ItemIndex") %>');Hide('Title_Edit_<%# DataBinder.Eval(Container, "ItemIndex") %>');" title="单击可修改相片标题"><%# DataBinder.Eval(Container, "DataItem.Title")%></div>
            <div id="Title_Edit_<%# DataBinder.Eval(Container, "ItemIndex") %>" class="EditPanel" style="display:none; text-align:center;">
            <div class="EditPanel_Input"><asp:TextBox ID="tbTitle" runat="server" style="width:40px;" Text='<%# DataBinder.Eval(Container, "DataItem.Title")%>'></asp:TextBox></div>
            <div class="EditPanel_Button">
            <asp:Button ID="btUpdateTitle" runat="server" CssClass="btnSubmit02" CommandName="rpPhoto_UpdateCommand" CommandArgument="UpdateTitle" /><input id="btCancelEditTitle" type="button" class="btnCancel02" onclick="Hide('Title_View_<%# DataBinder.Eval(Container, "ItemIndex") %>');Hide('Title_Edit_<%# DataBinder.Eval(Container, "ItemIndex") %>');" />
            </div>
            </div>
        </div>
        </div>
    </div>
    <div class="PhotoItem_Photo"><table><tr><td><a href="PhotoEdit.aspx?PhotoID=<%# DataBinder.Eval(Container, "DataItem.ID")%>"><img alt="<%# DataBinder.Eval(Container, "DataItem.Title")%>" src="<%# PhotoUrl%>" /></a></td></tr></table></div>
    <div class="PhotoItem_Description">
        <div class="ViewEditPanelBox">
        <div class="ViewEditPanel_onmouseout" onmouseover="this.className='ViewEditPanel_onmouseover';" onmouseout="this.className='ViewEditPanel_onmouseout';">
            <div id="Description_View_<%# DataBinder.Eval(Container, "ItemIndex") %>" class="ViewPanel" onclick="Hide('Description_View_<%# DataBinder.Eval(Container, "ItemIndex") %>');Hide('Description_Edit_<%# DataBinder.Eval(Container, "ItemIndex") %>');" title="单击可修改相片说明"><%#PhotoDescription%></div>
            <div id="Description_Edit_<%# DataBinder.Eval(Container, "ItemIndex") %>" class="EditPanel" style="display:none; text-align:center;">
            <div class="EditPanel_Input"><asp:TextBox ID="tbDescription" runat="server" TextMode="MultiLine" style="width:70px; height:30px;overflow:hidden" Text='<%# DataBinder.Eval(Container, "DataItem.Description")%>'></asp:TextBox></div>
            <div class="EditPanel_Button">
            <asp:Button ID="btUpdateDescription" runat="server" CssClass="btnSubmit02" CommandName="rpPhoto_UpdateCommand" CommandArgument="UpdateDescription" /><input id="btCancelEditDescription" type="button" class="btnCancel02" onclick="Hide('Description_View_<%# DataBinder.Eval(Container, "ItemIndex") %>');Hide('Description_Edit_<%# DataBinder.Eval(Container, "ItemIndex") %>');" />
            </div>
            </div>
        </div>
        </div>
    </div>
    <div class="PhotoItem_OtherInfo">
    <span class="PhotoItem_ViewStatus"><%#ViewStatusIcon %></span>
    <span class="PhotoItem_Edit"><a href="PhotoEdit.aspx?PhotoID=<%# DataBinder.Eval(Container, "DataItem.ID")%>"><img alt="修改相册[<%# DataBinder.Eval(Container, "DataItem.Title")%>]的属性" src="<%=AppUrl %>/Blogger/Admin/Album/Images/AlbumModify.gif" /></a></span>
    <span class="PhotoItem_SetCover"><asp:ImageButton ID="imgbtnPhotoSetCover" runat="server" ImageUrl="/Blogger/Admin/Album/Images/SetCover.gif" CommandName="rpPhoto_UpdateCommand" CommandArgument="SetCover" alt="设置该相片为相册封面" /></span>
    <span class="PhotoItem_Delete"><asp:ImageButton ID="imgbtnPhotoDelete" runat="server" ImageUrl="/Blogger/Admin/Album/Images/AlbumDelete.gif" CommandName="rpPhoto_UpdateCommand" CommandArgument="DeletePhoto" alt="删除该相片" OnClientClick="if(!confirm('您确定真的要删除该相片吗?')){return false;}" /></span>
    </div>
    </div>
    </li>
    </ItemTemplate>
    </asp:Repeater>
    </ul>
    
    <div id="PhotoListBottomPager" class="FullWidthBox">
    <webdiyer:AspNetPager ID="BottomPager" runat="server" OnPageChanged="BottomPager_PageChanged" AlwaysShow="True" UrlPaging="False" />
    </div>
    
    </ContentTemplate>
    </asp:UpdatePanel>
    
</div>
</form>
</asp:Content>
