<%@ Page CodeBehind="mysend.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.mysend" %>
<div runat="server" id="divList"  class="menuBlock">
	<div class="menuHead" style="overflow:hidden;border-bottom: 1px dashed #cfcfcf;">
	<h2 style="font-size: 18px;color: #1EA7DF;"><img src="pics/menu_file_cut.gif" align="absMiddle"> 已转发文件</h2>
	</div>
	<div class="menuBox2" style="border-top:none;">
    <div class="mListT">
        <span class="l2">文件名称</span>
        <span class="l3">再次转发 </span>
        <span class="l3">转发时间</span>
    </div>
    <ul class="menuList" id="mySendList">
        <asp:repeater runat="server" id="rpt_MySendList">
            <ItemTemplate>
                <li>
                <span class="l2">
				<a class="text" title="<%# DataBinder.Eval(Container.DataItem,"Action")%>"><%# DataBinder.Eval(Container.DataItem,"Action")%>
				</a>
				</span>
				<span class="l3">
                <a class="again-send linked" href="javascript:void(0);" data-href="send.aspx?path=/&sharelist=<%# DataBinder.Eval(Container.DataItem,"Action")%>">再次转发</a>
                </span>
                <span class="l3"><%# DataBinder.Eval(Container.DataItem,"ActionTime") %></span>
                
                </li>
           </ItemTemplate>
        </asp:repeater>
    </ul>
	<input type="hidden" value="" id="H_itemtCount"  runat="server"/>
	<input type="hidden" value="" id="H_currentPage"  runat="server"/>
    <input type="hidden" value="" id="H_pageSize"   runat="server"/>
	<div class="pageList" id="page"> 
	   
	</div>
	</div>
	<script type="text/javascript">
	var mySend = {};
	mySend.iframeDialog = null;
	/***
	*关闭上传文件窗口
	***/
	mySend.closeUploadFile = function(flag){
		if(this.iframeDialog){
			this.iframeDialog.close().remove();
			this.iframeDialog = null ;
		}
		if(flag){
			var d = dialog({content:flag});
			d.showModal();
			setTimeout(function(){d.close().remove();},2000);
		}
	}
	mySend.page = function(){
			function ajax(page_id,callback){
				//var d = dialog();
				//d.showModal();
				$.ajax({
					url:"mysend.aspx",
					cache:false,
					data:{pageIndex:page_id},
					dataType:"html",
					success:function(data){
						$("#wdContent").empty().append(data);
					//	d.close().remove();
					}
				});
			}
        var maxlength = parseInt($("#H_itemtCount").val());
        var current = parseInt($("#H_currentPage").val());
			 $("#page").pagination(maxlength, {
				prev_text: '< 上一页',
				next_text: '下一页 >',
				items_per_page: parseInt($("#H_pageSize").val()),
				num_display_entries: 5,
				current_page: current,
				num_edge_entries: 2,
				link_to: "javascript:void(0);",
				callback: function (page_id, panel) {
					var self = this;
					ajax(page_id, function (vdata) {
						self.maxentries = parseInt($("#H_itemtCount").val()); ;
						html(vdata);
					});
				}
			});
			
		}
		mySend.getAgain = function(){
			var that = this;
			$("#mySendList .again-send").bind("click",function(){
				var d = that.iframeDialog = dialog({
					content : "<iframe src='"+$(this).data("href")+"' style='border:none;width:800px;height:550px;'></iframe>",
					title : "转发文件" 
				});
				d.showModal();
			});
		}
		mySend.init = function(){
			this.getAgain();
			this.page();
		}
		mySend.init();
		var closeWindow = function(flag){
			mySend.closeUploadFile(flag);
		}
	</script>
</div>
