|
1 | 1 | /*
|
2 |
| - * jQuery File Upload User Interface Plugin 6.6.4 |
| 2 | + * jQuery File Upload User Interface Plugin 6.6.5 |
3 | 3 | * https://github.com/blueimp/jQuery-File-Upload
|
4 | 4 | *
|
5 | 5 | * Copyright 2010, Sebastian Tschan
|
|
70 | 70 | uploadTemplateId: 'template-upload',
|
71 | 71 | // The ID of the download template:
|
72 | 72 | downloadTemplateId: 'template-download',
|
| 73 | + // The container for the list of files. If undefined, it is set to |
| 74 | + // an element with class "files" inside of the widget element: |
| 75 | + filesContainer: undefined, |
| 76 | + // By default, files are appended to the files container. |
| 77 | + // Set the following option to true, to prepend files instead: |
| 78 | + prependFiles: false, |
73 | 79 | // The expected data type of the upload response, sets the dataType
|
74 | 80 | // option of the $.ajax upload requests:
|
75 | 81 | dataType: 'json',
|
|
85 | 91 | that._adjustMaxNumberOfFiles(-files.length);
|
86 | 92 | data.isAdjusted = true;
|
87 | 93 | data.files.valid = data.isValidated = that._validate(files);
|
88 |
| - data.context = that._renderUpload(files) |
89 |
| - .appendTo(options.filesContainer) |
90 |
| - .data('data', data); |
| 94 | + data.context = that._renderUpload(files).data('data', data); |
| 95 | + options.filesContainer[ |
| 96 | + options.prependFiles ? 'prepend' : 'append' |
| 97 | + ](data.context); |
91 | 98 | that._renderPreviews(files, data.context);
|
92 | 99 | that._forceReflow(data.context);
|
93 | 100 | that._transition(data.context).done(
|
|
0 commit comments