initial commit
[namibia] / public / scripts / blueimp-jQuery-File-Upload / test / index.html
1 <!DOCTYPE HTML>
2 <!--
3 /*
4  * jQuery File Upload Plugin Test 6.7
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 <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">
20 </head>
21 <body>
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">
32             <div class="span7">
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>
38                 </span>
39                 <button type="submit" class="btn btn-primary start">
40                     <i class="icon-upload icon-white"></i>
41                     <span>Start upload</span>
42                 </button>
43                 <button type="reset" class="btn btn-warning cancel">
44                     <i class="icon-ban-circle icon-white"></i>
45                     <span>Cancel upload</span>
46                 </button>
47                 <button type="button" class="btn btn-danger delete">
48                     <i class="icon-trash icon-white"></i>
49                     <span>Delete</span>
50                 </button>
51                 <input type="checkbox" class="toggle">
52             </div>
53             <div class="span5">
54                 <!-- The global progress bar -->
55                 <div class="progress progress-success progress-striped active">
56                     <div class="bar" style="width:0%;"></div>
57                 </div>
58             </div>
59         </div>
60         <!-- The loading indicator is shown during file processing -->
61         <div class="fileupload-loading"></div>
62         <br>
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>
65     </form>
66 </div>
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) { %}
77             <td>
78                 <div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
79             </td>
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>
84                 </button>
85             {% } %}</td>
86         {% } else { %}
87             <td colspan="2"></td>
88         {% } %}
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>
93             </button>
94         {% } %}</td>
95     </tr>
96 {% } %}
97 </script>
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) { %}
103             <td></td>
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>
107         {% } else { %}
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>
110             {% } %}</td>
111             <td class="name">
112                 <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>
113             </td>
114             <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
115             <td colspan="2"></td>
116         {% } %}
117         <td class="delete">
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>
121             </button>
122             <input type="checkbox" name="delete" value="1">
123         </td>
124     </tr>
125 {% } %}
126 </script>
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>
139 </body> 
140 </html>