16
16
< meta charset ="utf-8 ">
17
17
< title > jQuery File Upload Demo</ title >
18
18
< meta name ="description " content ="File Upload widget with multiple file selection, drag&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 -->
19
20
< link rel ="stylesheet " href ="http://blueimp.github.com/cdn/css/bootstrap.min.css ">
20
21
< style > body {padding-top : 60px ;}</ style >
22
+ <!-- Bootstrap styles for responsive website layout, supporting different screen sizes -->
21
23
< link rel ="stylesheet " href ="http://blueimp.github.com/cdn/css/bootstrap-responsive.min.css ">
24
+ <!-- Bootstrap CSS adjustments for IE6 -->
22
25
<!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
26
+ <!-- Bootstrap Image Gallery styles -->
23
27
< 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 -->
25
31
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
26
32
</ head >
27
33
< body >
@@ -58,9 +64,12 @@ <h1>jQuery File Upload Demo</h1>
58
64
Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.</ p >
59
65
</ blockquote >
60
66
< 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 -->
62
70
< div class ="row fileupload-buttonbar ">
63
71
< div class ="span6 ">
72
+ <!-- The fileinput-button span is used to style the file input field as button -->
64
73
< span class ="btn btn-success fileinput-button ">
65
74
< span > < i class ="icon-plus icon-white "> </ i > Add files...</ span >
66
75
< input type ="file " name ="files[] " multiple >
@@ -77,12 +86,14 @@ <h1>jQuery File Upload Demo</h1>
77
86
< input type ="checkbox " class ="toggle ">
78
87
</ div >
79
88
< div class ="span6 ">
89
+ <!-- The global progress bar -->
80
90
< div class ="progress progress-success progress-striped active fade ">
81
91
< div class ="bar " style ="width:0%; "> </ div >
82
92
</ div >
83
93
</ div >
84
94
</ div >
85
95
< br >
96
+ <!-- The table listing the files available for upload/download -->
86
97
< table class ="table table-striped "> < tbody class ="files " data-toggle ="modal-gallery " data-target ="#modal-gallery "> </ tbody > </ table >
87
98
</ form >
88
99
< br >
@@ -112,6 +123,7 @@ <h3 class="modal-title"></h3>
112
123
< a class ="btn modal-download " target ="_blank "> < i class ="icon-download "> </ i > Download</ a >
113
124
</ div >
114
125
</ div >
126
+ <!-- Error messages for the upload/download templates -->
115
127
< script >
116
128
var fileUploadErrors = {
117
129
maxFileSize : 'File is too big' ,
@@ -122,6 +134,7 @@ <h3 class="modal-title"></h3>
122
134
emptyResult : 'Empty file upload result'
123
135
} ;
124
136
</ script >
137
+ <!-- The template to display files available for upload -->
125
138
< script id ="template-upload " type ="text/html ">
126
139
{ % for ( var i = 0 , files = o . files , l = files . length , file = files [ 0 ] ; i < l ; file = files [ ++ i ] ) { % }
127
140
< tr class = "template-upload fade" >
@@ -150,6 +163,7 @@ <h3 class="modal-title"></h3>
150
163
</ tr >
151
164
{ % } % }
152
165
</ script >
166
+ <!-- The template to display files available for download -->
153
167
< script id ="template-download " type ="text/html ">
154
168
{ % for ( var i = 0 , files = o . files , l = files . length , file = files [ 0 ] ; i < l ; file = files [ ++ i ] ) { % }
155
169
< tr class = "template-download fade" >
@@ -179,19 +193,22 @@ <h3 class="modal-title"></h3>
179
193
</ script >
180
194
< script src ="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js "> </ script >
181
195
<!-- 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 >
183
197
<!-- The Templates and Load Image plugins are included for the FileUpload user interface -->
184
198
< script src ="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js "> </ script >
185
199
< script src ="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js "> </ script >
186
200
<!-- Bootstrap JS and Bootstrap Image Gallery are not required, but included for the demo -->
187
201
< script src ="http://blueimp.github.com/cdn/js/bootstrap.min.js "> </ script >
188
202
< script src ="http://blueimp.github.com/Bootstrap-Image-Gallery/bootstrap-image-gallery.min.js "> </ script >
189
203
<!-- 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 >
194
211
<!-- 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]-->
196
213
</ body >
197
214
</ html >
0 commit comments