<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.aspx.cs" Inherits="PowerEasy.Module.General.WebSite.UEditor.FileUpload" %>

<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>文件上传</title>
    <script src="../JS/jquery.pack.js" type="text/javascript"></script>
</head>
<body style="margin: 0;">

    <form id="form1" runat="server">
        <pe:FileUploadControl ID="AttachmentUpload" runat="server" Pattern="Popup" EnableInit="true" />
        <script type="text/javascript">
            var uploadFile;

            window.onload = function () {
                uploadFile = uploadFile || new PowerEasyWebUploader('<%=AttachmentUpload.ClientID%>');
            };

            /* 初始化onok事件 */
            function GetInsertList() {
                var list = [];
                list = uploadFile.getInsertList();
                var count = uploadFile.getQueueCount();
                if (count) {
                    $('.info', '#uploader-Container-<%=AttachmentUpload.ClientID%>').html('<span style="color:red;">' + '还有2个未上传文件'.replace(/[\d]/, count) + '</span>');
                    return false;
                }
                return list;
            }
        </script>
    </form>
</body>
</html>
