Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 67969d4

Browse files
committedFeb 9, 2012
Reorganizing the plugin files into folders.
Adding comments to every included resource in index.html.
1 parent c7023fc commit 67969d4

24 files changed

+39
-14
lines changed
 

‎jquery.fileupload-ui.css renamed to ‎css/jquery.fileupload-ui.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
width: 200px;
3737
}
3838
.progress-animated .bar {
39-
background: url(progressbar.gif);
39+
background: url(../progressbar.gif);
4040
filter: none;
4141
}
File renamed without changes.

‎index.html

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616
<meta charset="utf-8">
1717
<title>jQuery File Upload Demo</title>
1818
<meta name="description" content="File Upload widget with multiple file selection, drag&amp;drop support, progress bar and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.">
19+
<!-- Bootstrap CSS Toolkit styles -->
1920
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap.min.css">
2021
<style>body{padding-top:60px;}</style>
22+
<!-- Bootstrap styles for responsive website layout, supporting different screen sizes -->
2123
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-responsive.min.css">
24+
<!-- Bootstrap CSS adjustments for IE6 -->
2225
<!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
26+
<!-- Bootstrap Image Gallery styles -->
2327
<link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/bootstrap-image-gallery.min.css">
24-
<link rel="stylesheet" href="jquery.fileupload-ui.css">
28+
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
29+
<link rel="stylesheet" href="css/jquery.fileupload-ui.css">
30+
<!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
2531
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
2632
</head>
2733
<body>
@@ -58,9 +64,12 @@ <h1>jQuery File Upload Demo</h1>
5864
Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.</p>
5965
</blockquote>
6066
<br>
61-
<form id="fileupload" action="php/index.php" method="POST" enctype="multipart/form-data">
67+
<!-- The file upload form used as target for the file upload widget -->
68+
<form id="fileupload" action="server/php/" method="POST" enctype="multipart/form-data">
69+
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
6270
<div class="row fileupload-buttonbar">
6371
<div class="span6">
72+
<!-- The fileinput-button span is used to style the file input field as button -->
6473
<span class="btn btn-success fileinput-button">
6574
<span><i class="icon-plus icon-white"></i> Add files...</span>
6675
<input type="file" name="files[]" multiple>
@@ -77,12 +86,14 @@ <h1>jQuery File Upload Demo</h1>
7786
<input type="checkbox" class="toggle">
7887
</div>
7988
<div class="span6">
89+
<!-- The global progress bar -->
8090
<div class="progress progress-success progress-striped active fade">
8191
<div class="bar" style="width:0%;"></div>
8292
</div>
8393
</div>
8494
</div>
8595
<br>
96+
<!-- The table listing the files available for upload/download -->
8697
<table class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>
8798
</form>
8899
<br>
@@ -112,6 +123,7 @@ <h3 class="modal-title"></h3>
112123
<a class="btn modal-download" target="_blank"><i class="icon-download"></i> Download</a>
113124
</div>
114125
</div>
126+
<!-- Error messages for the upload/download templates -->
115127
<script>
116128
var fileUploadErrors = {
117129
maxFileSize: 'File is too big',
@@ -122,6 +134,7 @@ <h3 class="modal-title"></h3>
122134
emptyResult: 'Empty file upload result'
123135
};
124136
</script>
137+
<!-- The template to display files available for upload -->
125138
<script id="template-upload" type="text/html">
126139
{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}
127140
<tr class="template-upload fade">
@@ -150,6 +163,7 @@ <h3 class="modal-title"></h3>
150163
</tr>
151164
{% } %}
152165
</script>
166+
<!-- The template to display files available for download -->
153167
<script id="template-download" type="text/html">
154168
{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}
155169
<tr class="template-download fade">
@@ -179,19 +193,22 @@ <h3 class="modal-title"></h3>
179193
</script>
180194
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
181195
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
182-
<script src="vendor/jquery.ui.widget.js"></script>
196+
<script src="js/vendor/jquery.ui.widget.js"></script>
183197
<!-- The Templates and Load Image plugins are included for the FileUpload user interface -->
184198
<script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script>
185199
<script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>
186200
<!-- Bootstrap JS and Bootstrap Image Gallery are not required, but included for the demo -->
187201
<script src="http://blueimp.github.com/cdn/js/bootstrap.min.js"></script>
188202
<script src="http://blueimp.github.com/Bootstrap-Image-Gallery/bootstrap-image-gallery.min.js"></script>
189203
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
190-
<script src="jquery.iframe-transport.js"></script>
191-
<script src="jquery.fileupload.js"></script>
192-
<script src="jquery.fileupload-ui.js"></script>
193-
<script src="application.js"></script>
204+
<script src="js/jquery.iframe-transport.js"></script>
205+
<!-- The basic File Upload plugin -->
206+
<script src="js/jquery.fileupload.js"></script>
207+
<!-- The File Upload user interface plugin -->
208+
<script src="js/jquery.fileupload-ui.js"></script>
209+
<!-- The main application script -->
210+
<script src="js/main.js"></script>
194211
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->
195-
<!--[if gte IE 8]><script src="cors/jquery.xdr-transport.js"></script><![endif]-->
212+
<!--[if gte IE 8]><script src="js/cors/jquery.xdr-transport.js"></script><![endif]-->
196213
</body>
197214
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎test/index.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ <h2 id="qunit-banner"></h2>
2424
<h2 id="qunit-userAgent"></h2>
2525
<ol id="qunit-tests"></ol>
2626
<div id="qunit-fixture">
27-
<form id="fileupload" action="../php/index.php" method="POST" enctype="multipart/form-data">
27+
<!-- The file upload form used as target for the file upload widget -->
28+
<form id="fileupload" action="../server/php/" method="POST" enctype="multipart/form-data">
29+
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
2830
<div class="row fileupload-buttonbar">
2931
<div class="span6">
32+
<!-- The fileinput-button span is used to style the file input field as button -->
3033
<span class="btn btn-success fileinput-button">
3134
<span><i class="icon-plus icon-white"></i> Add files...</span>
3235
<input type="file" name="files[]" multiple>
@@ -43,15 +46,18 @@ <h2 id="qunit-userAgent"></h2>
4346
<input type="checkbox" class="toggle">
4447
</div>
4548
<div class="span6">
49+
<!-- The global progress bar -->
4650
<div class="progress progress-success progress-striped active fade">
4751
<div class="bar" style="width:0%;"></div>
4852
</div>
4953
</div>
5054
</div>
5155
<br>
56+
<!-- The table listing the files available for upload/download -->
5257
<table class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>
5358
</form>
5459
</div>
60+
<!-- Error messages for the upload/download templates -->
5561
<script>
5662
var fileUploadErrors = {
5763
maxFileSize: 'File is too big',
@@ -62,6 +68,7 @@ <h2 id="qunit-userAgent"></h2>
6268
emptyResult: 'Empty file upload result'
6369
};
6470
</script>
71+
<!-- The template to display files available for upload -->
6572
<script id="template-upload" type="text/html">
6673
{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}
6774
<tr class="template-upload fade">
@@ -90,6 +97,7 @@ <h2 id="qunit-userAgent"></h2>
9097
</tr>
9198
{% } %}
9299
</script>
100+
<!-- The template to display files available for download -->
93101
<script id="template-download" type="text/html">
94102
{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}
95103
<tr class="template-download fade">
@@ -118,12 +126,12 @@ <h2 id="qunit-userAgent"></h2>
118126
{% } %}
119127
</script>
120128
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
121-
<script src="../vendor/jquery.ui.widget.js"></script>
129+
<script src="../js/vendor/jquery.ui.widget.js"></script>
122130
<script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script>
123131
<script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>
124-
<script src="../jquery.iframe-transport.js"></script>
125-
<script src="../jquery.fileupload.js"></script>
126-
<script src="../jquery.fileupload-ui.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-ui.js"></script>
127135
<script src="http://code.jquery.com/qunit/git/qunit.js"></script>
128136
<script src="test.js"></script>
129137
</body>

0 commit comments

Comments
 (0)
Please sign in to comment.