提交 | 用户 | 时间
|
58d006
|
1 |
<!DOCTYPE HTML> |
A |
2 |
<!-- |
|
3 |
/* |
|
4 |
* jQuery File Upload Plugin Test 8.8.3 |
|
5 |
* https://github.com/blueimp/jQuery-File-Upload |
|
6 |
* |
|
7 |
* Copyright 2010, Sebastian Tschan |
|
8 |
* https://blueimp.net |
|
9 |
* |
|
10 |
* Licensed under the MIT license: |
|
11 |
* http://www.opensource.org/licenses/MIT |
|
12 |
*/ |
|
13 |
--> |
|
14 |
<html lang="en"> |
|
15 |
<head> |
|
16 |
<!-- Force latest IE rendering engine or ChromeFrame if installed --> |
|
17 |
<!--[if IE]> |
|
18 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
19 |
<![endif]--> |
|
20 |
<meta charset="utf-8"> |
|
21 |
<title>jQuery File Upload Plugin Test</title> |
|
22 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
23 |
<link rel="stylesheet" href="http://codeorigin.jquery.com/qunit/qunit-1.12.0.css"> |
|
24 |
</head> |
|
25 |
<body> |
|
26 |
<h1 id="qunit-header">jQuery File Upload Plugin Test</h1> |
|
27 |
<h2 id="qunit-banner"></h2> |
|
28 |
<div id="qunit-testrunner-toolbar"></div> |
|
29 |
<h2 id="qunit-userAgent"></h2> |
|
30 |
<ol id="qunit-tests"></ol> |
|
31 |
<div id="qunit-fixture"> |
|
32 |
<!-- The file upload form used as target for the file upload widget --> |
|
33 |
<form id="fileupload" action="../server/php/" method="POST" enctype="multipart/form-data"> |
|
34 |
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload --> |
|
35 |
<div class="row fileupload-buttonbar"> |
|
36 |
<div class="col-lg-7"> |
|
37 |
<!-- The fileinput-button span is used to style the file input field as button --> |
|
38 |
<span class="btn btn-success fileinput-button"> |
|
39 |
<i class="icon-plus icon-white"></i> |
|
40 |
<span>Add files...</span> |
|
41 |
<input type="file" name="files[]" multiple> |
|
42 |
</span> |
|
43 |
<button type="submit" class="btn btn-primary start"> |
|
44 |
<i class="icon-upload icon-white"></i> |
|
45 |
<span>Start upload</span> |
|
46 |
</button> |
|
47 |
<button type="reset" class="btn btn-warning cancel"> |
|
48 |
<i class="icon-ban-circle icon-white"></i> |
|
49 |
<span>Cancel upload</span> |
|
50 |
</button> |
|
51 |
<button type="button" class="btn btn-danger delete"> |
|
52 |
<i class="icon-trash icon-white"></i> |
|
53 |
<span>Delete</span> |
|
54 |
</button> |
|
55 |
<input type="checkbox" class="toggle"> |
|
56 |
<!-- The loading indicator is shown during file processing --> |
|
57 |
<span class="fileupload-loading"></span> |
|
58 |
</div> |
|
59 |
<!-- The global progress information --> |
|
60 |
<div class="col-lg-5 fileupload-progress"> |
|
61 |
<!-- The global progress bar --> |
|
62 |
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"> |
|
63 |
<div class="progress-bar progress-bar-success" style="width:0%;"></div> |
|
64 |
</div> |
|
65 |
<!-- The extended global progress information --> |
|
66 |
<div class="progress-extended"> </div> |
|
67 |
</div> |
|
68 |
</div> |
|
69 |
<!-- The table listing the files available for upload/download --> |
|
70 |
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table> |
|
71 |
</form> |
|
72 |
</div> |
|
73 |
<!-- The template to display files available for upload --> |
|
74 |
<script id="template-upload" type="text/x-tmpl"> |
|
75 |
{% for (var i=0, file; file=o.files[i]; i++) { %} |
|
76 |
<tr class="template-upload"> |
|
77 |
<td> |
|
78 |
<span class="preview"></span> |
|
79 |
</td> |
|
80 |
<td> |
|
81 |
<p class="name">{%=file.name%}</p> |
|
82 |
{% if (file.error) { %} |
|
83 |
<div><span class="label label-danger">Error</span> {%=file.error%}</div> |
|
84 |
{% } %} |
|
85 |
</td> |
|
86 |
<td> |
|
87 |
<p class="size">{%=o.formatFileSize(file.size)%}</p> |
|
88 |
{% if (!o.files.error) { %} |
|
89 |
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div> |
|
90 |
{% } %} |
|
91 |
</td> |
|
92 |
<td> |
|
93 |
{% if (!o.files.error && !i && !o.options.autoUpload) { %} |
|
94 |
<button class="btn btn-primary start"> |
|
95 |
<i class="icon-upload icon-white"></i> |
|
96 |
<span>Start</span> |
|
97 |
</button> |
|
98 |
{% } %} |
|
99 |
{% if (!i) { %} |
|
100 |
<button class="btn btn-warning cancel"> |
|
101 |
<i class="icon-ban-circle icon-white"></i> |
|
102 |
<span>Cancel</span> |
|
103 |
</button> |
|
104 |
{% } %} |
|
105 |
</td> |
|
106 |
</tr> |
|
107 |
{% } %} |
|
108 |
</script> |
|
109 |
<!-- The template to display files available for download --> |
|
110 |
<script id="template-download" type="text/x-tmpl"> |
|
111 |
{% for (var i=0, file; file=o.files[i]; i++) { %} |
|
112 |
<tr class="template-download"> |
|
113 |
<td> |
|
114 |
<span class="preview"> |
|
115 |
{% if (file.thumbnailUrl) { %} |
|
116 |
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a> |
|
117 |
{% } %} |
|
118 |
</span> |
|
119 |
</td> |
|
120 |
<td> |
|
121 |
<p class="name"> |
|
122 |
{% if (file.url) { %} |
|
123 |
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a> |
|
124 |
{% } else { %} |
|
125 |
<span>{%=file.name%}</span> |
|
126 |
{% } %} |
|
127 |
</p> |
|
128 |
{% if (file.error) { %} |
|
129 |
<div><span class="label label-danger">Error</span> {%=file.error%}</div> |
|
130 |
{% } %} |
|
131 |
</td> |
|
132 |
<td> |
|
133 |
<span class="size">{%=o.formatFileSize(file.size)%}</span> |
|
134 |
</td> |
|
135 |
<td> |
|
136 |
{% if (file.deleteUrl) { %} |
|
137 |
<button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}> |
|
138 |
<i class="glyphicon glyphicon-trash"></i> |
|
139 |
<span>Delete</span> |
|
140 |
</button> |
|
141 |
<input type="checkbox" name="delete" value="1" class="toggle"> |
|
142 |
{% } else { %} |
|
143 |
<button class="btn btn-warning cancel"> |
|
144 |
<i class="glyphicon glyphicon-ban-circle"></i> |
|
145 |
<span>Cancel</span> |
|
146 |
</button> |
|
147 |
{% } %} |
|
148 |
</td> |
|
149 |
</tr> |
|
150 |
{% } %} |
|
151 |
</script> |
|
152 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> |
|
153 |
<script src="../js/vendor/jquery.ui.widget.js"></script> |
|
154 |
<script src="http://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script> |
|
155 |
<script src="http://blueimp.github.io/JavaScript-Load-Image/js/load-image.min.js"></script> |
|
156 |
<script src="http://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script> |
|
157 |
<script src="../js/jquery.iframe-transport.js"></script> |
|
158 |
<script src="../js/jquery.fileupload.js"></script> |
|
159 |
<script>window.testBasicWidget = $.blueimp.fileupload;</script> |
|
160 |
<script src="../js/jquery.fileupload-process.js"></script> |
|
161 |
<script src="../js/jquery.fileupload-image.js"></script> |
|
162 |
<script src="../js/jquery.fileupload-audio.js"></script> |
|
163 |
<script src="../js/jquery.fileupload-video.js"></script> |
|
164 |
<script src="../js/jquery.fileupload-validate.js"></script> |
|
165 |
<script src="../js/jquery.fileupload-ui.js"></script> |
|
166 |
<script>window.testUIWidget = $.blueimp.fileupload;</script> |
|
167 |
<script src="http://codeorigin.jquery.com/qunit/qunit-1.12.0.js"></script> |
|
168 |
<script src="test.js"></script> |
|
169 |
</body> |
|
170 |
</html> |