Lines 48-53
Link Here
|
48 |
<input type="file" id="fileToUpload" name="fileToUpload" multiple/> |
48 |
<input type="file" id="fileToUpload" name="fileToUpload" multiple/> |
49 |
</div> |
49 |
</div> |
50 |
</li> |
50 |
</li> |
|
|
51 |
<li> |
52 |
<label for="fileChecksum">Add file checksum to the uploaded filename: </label> |
53 |
<label class="radio"> |
54 |
Yes<input type="radio" name="checksum" id="checksum" value="1" checked /> |
55 |
No<input type="radio" name="checksum" id="checksum" value="0" /> |
56 |
</label> |
57 |
</li> |
58 |
[% IF uploadpaths %] |
59 |
<li> |
60 |
<label for="uploadpath">Upload Path: </label> |
61 |
<select id="uploadpath" name="uploadpath"> |
62 |
[% IF !plugin %] |
63 |
<option value=""></option> |
64 |
[% END %] |
65 |
[% FOREACH dir IN uploadpaths %] |
66 |
<option value="[% dir.code | html %]">[% dir.name | html %]</option> |
67 |
[% END %] |
68 |
</select> |
69 |
</li> |
70 |
[% END %] |
51 |
[% IF uploadcategories %] |
71 |
[% IF uploadcategories %] |
52 |
<li> |
72 |
<li> |
53 |
<label for="uploadcategory">Category: </label> |
73 |
<label for="uploadcategory">Category: </label> |
Lines 156-162
Link Here
|
156 |
<tr> |
176 |
<tr> |
157 |
<th>Filename</th> |
177 |
<th>Filename</th> |
158 |
<th>Size</th> |
178 |
<th>Size</th> |
|
|
179 |
<th>File checksum</th> |
159 |
<th>Hashvalue</th> |
180 |
<th>Hashvalue</th> |
|
|
181 |
<th>Upload path</th> |
160 |
<th>Category</th> |
182 |
<th>Category</th> |
161 |
[% IF !plugin %]<th>Public</th>[% END %] |
183 |
[% IF !plugin %]<th>Public</th>[% END %] |
162 |
[% IF !plugin %]<th>Temporary</th>[% END %] |
184 |
[% IF !plugin %]<th>Temporary</th>[% END %] |
Lines 168-174
Link Here
|
168 |
<tr> |
190 |
<tr> |
169 |
<td>[% record.filename | html %]</td> |
191 |
<td>[% record.filename | html %]</td> |
170 |
<td>[% record.filesize | html %]</td> |
192 |
<td>[% record.filesize | html %]</td> |
|
|
193 |
<td>[% IF record.checksum %]Yes[% ELSE %]No[% END %]</td> |
171 |
<td>[% record.hashvalue | html %]</td> |
194 |
<td>[% record.hashvalue | html %]</td> |
|
|
195 |
<td>[% record.dir | html %]</td> |
172 |
<td>[% record.uploadcategorycode | html %]</td> |
196 |
<td>[% record.uploadcategorycode | html %]</td> |
173 |
[% IF !plugin %] |
197 |
[% IF !plugin %] |
174 |
<td>[% IF record.public %]Yes[% ELSE %]No[% END %]</td> |
198 |
<td>[% IF record.public %]Yes[% ELSE %]No[% END %]</td> |
Lines 271-286
Link Here
|
271 |
$("#searchfile").hide(); |
295 |
$("#searchfile").hide(); |
272 |
$("#lastbreadcrumb").text( _("Add a new upload") ); |
296 |
$("#lastbreadcrumb").text( _("Add a new upload") ); |
273 |
|
297 |
|
274 |
var cat, xtra=''; |
298 |
var dir, cat, xtra=''; |
275 |
if( $("#uploadcategory").val() ) |
299 |
if( $("#uploadcategory").val() ) |
276 |
cat = encodeURIComponent( $("#uploadcategory").val() ); |
300 |
cat = encodeURIComponent( $("#uploadcategory").val() ); |
277 |
if( cat ) xtra= 'category=' + cat + '&'; |
301 |
if( cat ) xtra= 'category=' + cat + '&'; |
|
|
302 |
|
278 |
[% IF plugin %] |
303 |
[% IF plugin %] |
279 |
xtra = xtra + 'public=1&temp=0'; |
304 |
xtra = xtra + 'public=1&temp=0&'; |
280 |
[% ELSE %] |
305 |
[% ELSE %] |
281 |
if( !cat ) xtra = 'temp=1&'; |
306 |
if( !cat ) xtra = 'temp=1&'; |
282 |
if( $('#public').prop('checked') ) xtra = xtra + 'public=1'; |
307 |
if( $('#public').prop('checked') ) xtra = xtra + 'public=1&'; |
283 |
[% END %] |
308 |
[% END %] |
|
|
309 |
if( $("#uploadpath").val() ) |
310 |
dir = encodeURIComponent( $("#uploadpath").val() ); |
311 |
if( dir ) xtra= xtra + 'dir=' + dir + '&'; |
312 |
xtra = xtra + 'checksum=' + $('#checksum:checked').val(); |
284 |
xhr= AjaxUpload( $('#fileToUpload'), $('#fileuploadprogress'), xtra, cbUpload ); |
313 |
xhr= AjaxUpload( $('#fileToUpload'), $('#fileuploadprogress'), xtra, cbUpload ); |
285 |
} |
314 |
} |
286 |
function CancelUpload() { |
315 |
function CancelUpload() { |