4 * jQuery File Upload Plugin Test 6.7
5 * https://github.com/blueimp/jQuery-File-Upload
7 * Copyright 2010, Sebastian Tschan
10 * Licensed under the MIT license:
11 * http://www.opensource.org/licenses/MIT
16 <meta charset="utf-8">
17 <title>jQuery File Upload Plugin Test</title>
18 <meta name="viewport" content="width=device-width">
19 <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css">
22 <h1 id="qunit-header">jQuery File Upload Plugin Test</h1>
23 <h2 id="qunit-banner"></h2>
24 <div id="qunit-testrunner-toolbar"></div>
25 <h2 id="qunit-userAgent"></h2>
26 <ol id="qunit-tests"></ol>
27 <div id="qunit-fixture">
28 <!-- The file upload form used as target for the file upload widget -->
29 <form id="fileupload" action="../server/php/" method="POST" enctype="multipart/form-data">
30 <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
31 <div class="row fileupload-buttonbar">
33 <!-- The fileinput-button span is used to style the file input field as button -->
34 <span class="btn btn-success fileinput-button">
35 <i class="icon-plus icon-white"></i>
36 <span>Add files...</span>
37 <input type="file" name="files[]" multiple>
39 <button type="submit" class="btn btn-primary start">
40 <i class="icon-upload icon-white"></i>
41 <span>Start upload</span>
43 <button type="reset" class="btn btn-warning cancel">
44 <i class="icon-ban-circle icon-white"></i>
45 <span>Cancel upload</span>
47 <button type="button" class="btn btn-danger delete">
48 <i class="icon-trash icon-white"></i>
51 <input type="checkbox" class="toggle">
54 <!-- The global progress bar -->
55 <div class="progress progress-success progress-striped active">
56 <div class="bar" style="width:0%;"></div>
60 <!-- The loading indicator is shown during file processing -->
61 <div class="fileupload-loading"></div>
63 <!-- The table listing the files available for upload/download -->
64 <table class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>
67 <!-- The template to display files available for upload -->
68 <script id="template-upload" type="text/x-tmpl">
69 {% for (var i=0, file; file=o.files[i]; i++) { %}
70 <tr class="template-upload">
71 <td class="preview"><span class=""></span></td>
72 <td class="name"><span>{%=file.name%}</span></td>
73 <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
74 {% if (file.error) { %}
75 <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
76 {% } else if (o.files.valid && !i) { %}
78 <div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
80 <td class="start">{% if (!o.options.autoUpload) { %}
81 <button class="btn btn-primary">
82 <i class="icon-upload icon-white"></i>
83 <span>{%=locale.fileupload.start%}</span>
89 <td class="cancel">{% if (!i) { %}
90 <button class="btn btn-warning">
91 <i class="icon-ban-circle icon-white"></i>
92 <span>{%=locale.fileupload.cancel%}</span>
98 <!-- The template to display files available for download -->
99 <script id="template-download" type="text/x-tmpl">
100 {% for (var i=0, file; file=o.files[i]; i++) { %}
101 <tr class="template-download">
102 {% if (file.error) { %}
104 <td class="name"><span>{%=file.name%}</span></td>
105 <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
106 <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
108 <td class="preview">{% if (file.thumbnail_url) { %}
109 <a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>
112 <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>
114 <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
115 <td colspan="2"></td>
118 <button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
119 <i class="icon-trash icon-white"></i>
120 <span>{%=locale.fileupload.destroy%}</span>
122 <input type="checkbox" name="delete" value="1">
127 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
128 <script src="../js/vendor/jquery.ui.widget.js"></script>
129 <script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script>
130 <script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>
131 <script src="http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script>
132 <script src="../js/jquery.iframe-transport.js"></script>
133 <script src="../js/jquery.fileupload.js"></script>
134 <script src="../js/jquery.fileupload-fp.js"></script>
135 <script src="../js/jquery.fileupload-ui.js"></script>
136 <script src="../js/locale.js"></script>
137 <script src="http://code.jquery.com/qunit/git/qunit.js"></script>
138 <script src="test.js"></script>