<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Template_Picture_Upload_Dialog, V5Shop.Shop.Template" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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 runat="server">
    <title>请选择您要批量上传的图片</title>
    <link href="../css/css.css" rel="stylesheet" type="text/css">
    <link href="../css/css_list.css" rel="stylesheet" type="text/css">
    <link href="../css/control.css" rel="stylesheet" type="text/css">
    <link href="UploadCss.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" language="javascript" src="Control_Upload.js"></script>

</head>
<body>
    <!--<img src="../images/icon/key_output.gif" /> 
    <span style="color:Red; font-size:14px; font-weight:bold"><- 请点击这个小图片选择您要上传的图片</span>-->
    <div id="demo">
        <form id="form-demo" method="post" enctype="multipart/form-data">
            <fieldset id="demo-fallback" style="margin:10px;">
                <legend>图片批量上传</legend>
                <p>
                    请选择您要批量上传的文件<br>
                </p>
                <label for="demo-photoupload">
                    <input id="demo-photoupload" type="file" name="Filedata" style="display:none">
                    <input type="button" id="demo-browse-images" value="请选择您要上传的图片" class="button" />
                </label>
                
            </fieldset>
            <div class="hide" id="demo-status" style="margin:10px;">
                <p>
                    <input type="hidden" name="FolderName" value="<%=FolderName %>" />
                    <input type="button" id="demo-clear" value="清除" class="button" />
                    <input type="button" id="demo-upload" value="上传图片" class="button" />
                </p>
                <div>
                    <strong class="overall-title">整体进度</strong><br>
                    <img class="progress overall-progress" src="bar.gif">
                </div>
                <div>
                    <strong class="current-title">单文件进度</strong><br>
                    <img class="progress current-progress" src="bar.gif">
                </div>
                <div class="current-text">
                </div>
            </div>
            <ul id="demo-list">
            </ul>
        </form>
    </div>

    <script type="text/javascript">
		/* <![CDATA[ */

window.addEvent('load', function() {
	var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
		'url': document.URL,
		'fieldName': 'Filedata',
		'path': 'Swiff.Uploader.swf',
		'onLoad': function() {
		    return;
		},
		'onAllComplete': function() {
	        alert('图片批量上传成功！');
	        window.opener.location.href="<%=url %>";
	        window.close();
		}
	});
	
	/**
	 * Various interactions
	 */
	 
	$('demo-browse-images').addEvent('click', function() {
		swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'});
		return false;
	});

	$('demo-clear').addEvent('click', function() {
		swiffy.removeFile();
		return false;
	});
	
	$('demo-upload').addEvent('click', function() {
		swiffy.upload();
		return false;
	});

});
		/* ]]> */
    </script>

    
</body>
</html>
